Facebook Connect button not showing up in Safari/Chrome

GRex picture GRex · May 1, 2009 · Viewed 9k times · Source

My implementation of Facebook Connect (just a simple login button, fb:login-button) works perfectly on Firefox and IE.

But the same button is not showing up in Safari/Chrome (Webkit).

Here's what's ironic. In my debugging effort, I saved the page (that contains fb:login-button) up as a static page and then load it in Safari. And the button shows up, everything works!

The exact same page (with the exact same HTML source) rendered by my PHP has no way for bringing up the button.

I'm trying hard to support Webkit here but I'm close to giving up. Can anybody help?

Answer

Nathan picture Nathan · Oct 7, 2011

I found one more way this can occur (the blame-myself-for-being-stupid way); it's probably not common, but in the event is saves anyone else the hassle, here it is:

This symptom can also be caused by various security tools blocking facebook resources.

In my case, I'd installed Facebook Disconnect ages ago in Chrome as a plugin and forgotten all about it being installed. I also had a second installation of Chrome that was seemingly identical (but did not have Facebook Disconnect). The first would properly load the fb:login-button, and the other would not; took me ages before I looked at the plugins, because Facebook Disconnect didn't have an icon and so its presence was pretty easy for me to miss.

Here's what you'll see if some sort of security plugin is preventing facebook resources from loading. Just look at the html that renders in the browser using developer tools.

In a normal chrome session you'll end up with something like this:

<fb:login-button><a class="fb_button fb_button_medium"><span class="fb_button_text">Your text here</span></a></fb:login-button>

But in the version with facebook's resources disabled you'll end up with this:

<fb:login-button>Your text here</fb:login-button>

Like I said, pretty obvious in retrospect.