Topic-icon Facebook Like button only visible to FB logged in users + JS errors

Active Subscriptions:

None
Hi,

JFBConnect: 4.2.4
Joomla: 2.5.6
Site: www.theymadeapromise.com/

I have just noticed that Facebook Like/Recommend button does not show up when a user is logged out of Facebook. Tested myself + on other devices/FB accounts.
Like box and comments still work.

This seems to be a know issue (developers.facebook.com/bugs/130242697118406, developers.facebook.com/bugs/396199967108318, developers.facebook.com/bugs/367507079985361, developers.facebook.com/bugs/182306028567936).

For a second I thought that this has something to do with developers.facebook.com/docs/reference/plugins/like/migration/ - but I DO have age restriction set to 13+ Anyone (both in the App and JFBConnect Open Graph settings: "og:restrictions:age=13+" - correct?).

I have AddThis code installed, but same thing happens when I use {JFBCLike} or FB's own code.
NOW, the href parameter is currently set to "www.theymadeapromise.com". IF I set it to, let's say, "www.facebook.com" - then the Like button is displayed regardless of my FB logged in/out status. Likewise, if I use "www.theymadeapromise.com" (i.e. secure HTTPS) then the Like button is always displayed. However, I I do not actually have a SSL certificate allocated to the site so can't use the httpS option...

I've browsed dozens of sites today - they all show Like buttons even when I am not logged into Facebook. Must be my site then - or some JBConnect settings I have messed up.
Any thoughts? How can I make the Like button show at all times, without using SSL and with my original site as HREF?

Also, while I have you here and to avoid wasting a second support topic, I noticed 3 JS errors earlier today - please have a look at the files attached:
File Attachment:

- the first one (Chrome tools) seems to refer to opening LikeBox. Can this error be ignored?

File Attachment:

- the second one (Firebug) is from FB's all.js

File Attachment:

- the third one (Firebug) I could not understand at all, but also seems to be FB/all.js related...

Thank you!
Konstantin
The topic has been locked.
Support Specialist
Konstantin,
Thanks for the bug reports. The issue seems to be a bug on Facebook's end when the fb:app_id Open Graph tag is included on the page. They recommend *always* including this tag, and so JFBConnect automatically puts it there. However, if you can try the below options to disable that tag, you may have some luck.

First, try going to the Social -> Open Graph tab, simply add the following:
app_id=1234
That *should* override our insertion of the App ID. If you look at the source HTML and it doesn't though, you can modify JFBConnect to not add the tag at all. To do so, edit /libraries/sourcecoast/openGraph.php. At about line 95, you'll see:
if (strpos($headerGraphString, 'fb:app_id') === false && SCSocialUtilities::areJFBConnectTagsEnabled())
            {
                $appId = SCSocialUtilities::getJFBConnectAppId();
                $headerGraphString .= '<meta property="fb:app_id" content="' . $appId . '"/>' . CARRIAGE_RETURN;
            }
Simply modify that by placing a // in front of the $headerGraphString, like below:
$headerGraphString .= '<meta property="fb:app_id" content="' . $appId . '"/>' . CARRIAGE_RETURN;

Hope that helps. The reason it works with https is because Facebook can't scan that page (you don't have an SSL cert), and so it's not finding that tag.

Best of luck!
Alex
The topic has been locked.
Active Subscriptions:

None
Hi Alex,

As always, thank you for the prompt response!
I have tried both things you suggested - but no luck so far. The <meta property did change to "fb:app_id" content="1234"/>, and I also tried to remove it completely.
Is there anything else I could try?

Best wishes,
Konstantin
The topic has been locked.
Support Specialist
Konstantin,
Meant to mention it earlier.. after you update the app_id setting using either method, re-run your page through the Facebook URL Debug Tool. That will make Facebook re-scan the tags. Otherwise, they'll still use the old tags until their spider re-indexes the page (1-7 days later).

Facebook URL Debug Tool
You can also use that tool to verify that the new (or missing) app_id has taken effect.

Best of luck, and definitely let us know how it goes,
Alex
The topic has been locked.
Active Subscriptions:

None
Alex,
Have just tried re-scanning with FB's debugger - still nothing I'm afraid. Obviously, with 1234 it produces an error "Object at URL 'www.theymadeapromise.com/' of type 'website' is invalid because the given value '1234' for property 'fb:app_id' could not be parsed as type 'fbid'."

Just in case I am missing something obvious - the age restriction code i use in Social-Open Graph-Defaults field is "og:restrictions:age=13+", which produces
<meta property="og:restrictions:age" content="13+"/>. That's all correct, right?

Do you have any more thoughts re FB Like button? If FB still hides it even without a appid in meta tags, what else could it be?

Thank you,
K
The topic has been locked.
Support Specialist
K,
I'm a little unsure if you tried this, so if you did already, I apologize for suggesting it again. Please make the code change I mentioned above to remove the app_id OG tag altogether and then run your page through the FB Debugger. The app_id=1234 obviously doesn't have the intended effect if it's just throwing an error, but it was worth a shot. Hopefully, re-debugging it will have Facebook re-fetch the page, see the missing app_id and hopefully fix whatever bug it is on their end. If you've already tried that, let us know. We'll try to come up with more ideas, but this is something on FB's end that we may likely not be able to fix.

Have you used the "Does this repro describe your issue?" link in the bug reports you mentioned in the first post? If not, I'd highly recommend doing that to make sure Facebook a) sees that more people are having this problem and b) know your exact site information which may help them narrow down the bug as well.

Finally, it doesn't sound like your doing the Age restriction wrong, though we've never really tested with that Open Graph setting. I just looked at the FB developers area and the tag you provided is exactly what they recommend.

Hope that all helps,
Alex
The topic has been locked.
Active Subscriptions:

None
Hi Alex,

Yes, I have tried removing app_id altogether and debugging with FB tool. Tried again today - just to be on the safe side. Still nothing.

In fact, even if you put www.theymadeapromise.com as URL at developers.facebook.com/docs/reference/plugins/like/ - it doesn't show the button (when you are logged out of FB).

Good point re FB bugs - I've "repro"ed all the ones that apply to my case. Btw, one of those bugs was solved for one particular developer by removing/changing the app_id - shame this hasn't worked for me.

Since 99% of all sites have FB Like buttons working when I'm logged out of FB, what I am trying to understand is if this has something to do with my website itself OR with JFBConnect's og/fb setting for my site. I will try turning JFBConnect off during the night - just to check. I really do want to keep it though!

What do you think? Is there anything else in JFBC's settings that could render the site unreadable for FB in offline mode?

NB: I have just checked demo.sourcecoast.com/index.php?option=co...icle&id=1&Itemid=110 in "offline FB mode" - and could see all the buttons OK... So we know it's not JFBC with its default settings. Either my local settings OR just my site...

Thank you,
K
The topic has been locked.