Hi
I am trying to get meta for facebook and other sharing working right. I want to give the ability to share / like members photos but when I try to put in a fb / addthis widget and i put the meta in for that page which would be 'photos view' i can't get it to work because each individual photo has an individual page title making it impossible to make meta tags. I tried putting the widget code directly into the bx page, which it did as intended appeared right underneath the image hoping it would notice that image, but again the widget doesn't pick up the members image just the random one fb thinks i want to use.
Is there a meta code that i can use to allow people to share their photos across social networking because I am at a loss right now. I use Head injections for the meta which works fabulously in all other respects.
|
|
Ask FaceSucks lol; they claim all you have to do is to pass the proper og bits in the header and all is happy. Now, Dolphin does not do this automatically, so you will need to go into the code and make changes and then add the bits to the header so that it will contain the og bits. However, even after I did the changes FaceSucks still did not display it correctly.
I sort of wish people would not harp on Dolphin about this, this is a FaceSucks issue so go to FaceSucks support and ask them how to fix it.
Geeks, making the world a better place |
I already have they just say i have to state the image in the meta which is rubbish when i want to display members images i'd have to make hundreds of image meta tags at that rate. Ah well i just won't include likes on the photos bit |
I think I had asked this question before, now I have an answer :p
add the orange stuff.
edit /template/{templateName}/_header.html
__page_description__ __page_keywords__ __page_og_image__
then /inc/classes/BxDolTemplate.php
case 'page_description': if(!empty($GLOBALS[$this->_sPrefix . 'PageDescription']) && is_string($GLOBALS[$this->_sPrefix . 'PageDescription'])) $sRet = '<meta name="description" content="' . bx_html_attribute($GLOBALS[$this->_sPrefix . 'PageDescription']) . '" />'; break; case 'page_og_image': if(isset($GLOBALS['PageOGImage']) && !empty($GLOBALS['PageOGImage']) && is_string($GLOBALS['PageOGImage'])) $sRet = '<meta property="og:image" content="' . bx_html_attribute($GLOBALS['PageOGImage']) . '" />'; break; case 'page_header': if(!empty($GLOBALS[$this->_sPrefix . 'PageTitle'])) $sRet = $GLOBALS[$this->_sPrefix . 'PageTitle']; else if(isset($_page['header'])) $sRet = $_page['header']; Edit /inc/classes/BxDolFilesModule.php
// album data about prev and next files // calculation of un-approved files in album $sClassName = $this->_oConfig->getClassPrefix() . 'Search'; bx_import('Search', $this->_aModule); $oSearch = new $sClassName(); $oSearch->aCurrent['restriction']['albumId'] = array('value' => $aInfo['albumId'], 'field' => 'ID', 'operator' => '=', 'table'=>'sys_albums'); $oSearch->aCurrent['restriction']['activeStatus']['operator'] = '<>';
if($sClassName === 'BxPhotosSearch') $GLOBALS['PageOGImage'] = $oSearch->getImgUrl($aInfo['Hash'], 'file');
$aIds = ''; $aExcludeList = $oSearch->getSearchData();
and its done, not the cleanest way but quickest ;)
so much to do.... |
RE
add the orange stuff.
I'm color blind; can you highlight with another better contrast color?
ManOfTeal.COM a Proud UNA site, six years running strong! |
i can't find that file to edit, where is it? |
i found the files (being dumb again) but....it didn't work same issue. thanks for anyway |
i found the files (being dumb again) but....it didn't work same issue. thanks for anyway
Did you clear your cache?
ManOfTeal.COM a Proud UNA site, six years running strong! |
I also can not get it to work. emptied cache in BoonEx, as well as my browser |
yes i cleared cache in dolphin and in my website but it won't work still
http://prntscr.com/6l9c3t still has same random image of a flag
|
The most likely problem is you can't do proper sharing of photos that are not viewable by guests. When you go to any photo on your site as a guest you get a access denied message. The problem with this, is the facebook crawler that looks at the page for open graph tags and photos is not going to see the page as it would look for logged in members because it is viewing the page as a guest would see it. So sharing does not work properly if your restricting access to the photos. https://www.deanbassett.com |
only logged in members and not public images? |
well i made images public and it still didn't work, also the person was logged in so neither work |
Voni, did you try to use the Boonex share button on the photo page?
[edit] I was able to get that one to pull the photo, but when posting over to FB, looks like they are stripping it out.
example video
https://www.youtube.com/watch?v=Hl1AV3Kn36o
ManOfTeal.COM a Proud UNA site, six years running strong! |
well i made images public and it still didn't work, also the person was logged in so neither work
Being logged in makes no difference. Facebook cannot login. If the photo page shows a access denied message for guests(not logged in) than that is all facebook will see as well.
Use facebooks debug tool. https://developers.facebook.com/tools/debug/ enter the url to the photo. That debug tool will tell you what facebook sees. You will then be able to know if it is picking up the og: tag you say you added to the page.
https://www.deanbassett.com |
Use facebooks debug tool. https://developers.facebook.com/tools/debug/ enter the url to the photo. That debug tool will tell you what facebook sees. You will then be able to know if it is picking up the og: tag you say you added to the page.
I tried that tool and have some questions about it and our page layout.
The page layout make a huge difference on what FB "sees."
The location of the image, the and share buttons effect this.
Voni, hate to hijack the thread but this is in relation to what is happening.
@Voni; are you still using the responsive template? If so, that makes a difference for some reason as well.
ManOfTeal.COM a Proud UNA site, six years running strong! |
I'll post an example link.
http://tabethajadeashley.com/m/photos/view/Photography-Kate-Oddy-Makeup-Faces-by-Janellie-PRO-Makeup-Artist
Using that link on the debug tool I get conflicting errors but show the picture correctly.



ManOfTeal.COM a Proud UNA site, six years running strong! |
@Newton. You do not have any OG meta tags on that page. So facebook is scanning the page and trying to guess what they should be. That is what inferred means. All the warnings your getting would go away if that page had all the proper meta tags.
Put this URL on my site into facebooks debugger. http://www.deanbassett.com/m/photos/view/16552-175485159741-3929411-n-jpg or any other photo URL on my site.
You will find none of them should have any errors or warnings.
I am working on a mod to do proper OG tags. See this post. http://www.boonex.com/forums/topic/New-Open-Graph-meta-tag-module-.htm
However, this module will not correct voni's issue. If the photo view pages generate a Access Denied error, for guests, then facebook cannot scrape the page for the complete set of tags. https://www.deanbassett.com |
However, this module will not correct voni's issue. If the photo view pages generate a Access Denied error, for guests, then facebook cannot scrape the page for the complete set of tags.
Thanks for explaining that Deano.
[edit] and I seen the post, I have subscribed to it!
And yes, I'm aware that things that are set private or members only will not share...(access denied)
ManOfTeal.COM a Proud UNA site, six years running strong! |
I think I had asked this question before, now I have an answer :p add the orange stuff.
@Voni, this worked for me using the "share" button on the page.

ManOfTeal.COM a Proud UNA site, six years running strong! |
OK, seem to be getting closer to a fix for myself.
In the _header.html the format seems to through FB off.
Rearranging the meta section seems to fix some problems.
I will post some images later, but moving the meta info above the title section lets FB see more.
ManOfTeal.COM a Proud UNA site, six years running strong! |
@Prashank25
Is there a way to make this line work?
<meta property="og:url" content="page_og_url" />
I've tried using what you posted and changing but I do not fully understand it.
So far this is what I get now.

All that is missing is the URL fix.
ManOfTeal.COM a Proud UNA site, six years running strong! |
Moving the code in _header.html worked for me.
This is the code layout in my editor.

This is the page source, what FB would see. The meta info looks much better and FB likes it this way.

ManOfTeal.COM a Proud UNA site, six years running strong! |
@newton yes i am still using that reactive template you know i love it so :) |
@newton yes i am still using that reactive template you know i love it so :)
I seen that, now the other problems you have.
Look at your sites photos home page, right click the page and you can see your head injections module supplied all the information and the photo shares to FB properly.
I think the changes I made above we should do for your site since each photo on this instance is random.
I tested the above and it's working for me.
We need to do it on your site now.
PM me.
ManOfTeal.COM a Proud UNA site, six years running strong! |
then /inc/classes/BxDolTemplate.php
case 'page_description': if(!empty($GLOBALS[$this->_sPrefix . 'PageDescription']) && is_string($GLOBALS[$this->_sPrefix . 'PageDescription'])) $sRet = ''; break; case 'page_og_image': if(isset($GLOBALS['PageOGImage']) && !empty($GLOBALS['PageOGImage']) && is_string($GLOBALS['PageOGImage'])) $sRet = ''; break; case 'page_header': if(!empty($GLOBALS[$this->_sPrefix . 'PageTitle'])) $sRet = $GLOBALS[$this->_sPrefix . 'PageTitle']; else if(isset($_page['header'])) $sRet = $_page['header'];
If you did this, the update to 7.1.6 breaks this and you need to re insert
ManOfTeal.COM a Proud UNA site, six years running strong! |
7.1.6 includes this functionality already, no need to do this.
the update to 7.1.6 breaks this and you need to re insert
Rules → http://www.boonex.com/terms |
7.1.6 includes this functionality already, no need to do this.
the update to 7.1.6 breaks this and you need to re insert
OK, I will remove it then.
Great news!
ManOfTeal.COM a Proud UNA site, six years running strong! |