Screwy behavior from Facebook like buttons
May 31, 2010 12:46 PM   Subscribe

I'm trying to put Facebook "like" buttons on my blog posts. Some of them work. Some of them don't. I can't discern any pattern.

I'm using this Facebook page to generate the code.

I've seen this Mashable post on a "like" button virus, but it doesn't seem to the issue here. I've also seen this thread and a few others in the Facebook forums about the problem, but the suggested fixes don't seem to apply in this case. Or, at least, I can't make out how they could. (My posts, for instance, don't contain any instances of the span tag that I can find.) I've tried using both the iFrame version and the XFBML version of the "like" button. Both have the same problem.

The error returned is: "The page at http://www.xxx.com could not be reached." But when I copy and paste that URL into the browser, the page loads just fine.

Here is an example of a blog post where the button works:
http://www.waffleizer.com/waffleizer/2010/01/recipe-smoreffles.html

And here is an example of a post where it does not:
http://www.waffleizer.com/waffleizer/2010/04/gale-gand.html

[I'm sensitive to the issue of self-linking, but not sure how to otherwise illustrate the problem.]

I'm blogging on Typepad, where tech support is not so hot. (I've had a ticket into them for a week now.) I have looked at the Facebook forums, but nothing seems applicable. So I'm turning to Ask.Me for help. I'm willing to believe it's a glitch on Facebook's part, but it also seems like I could probably work around it on my side, if only I could figure out how.

Thank you very much in advance.
posted by veggieboy to Computers & Internet (10 answers total) 1 user marked this as a favorite
 
I'm going to guess your code is being munged by the fact you're entering it manually each and every time. Have you tied the automated FB Like plugin (or whatever the term used on Typepad is) instead? More directions, directly from Typepad.
posted by DarlingBri at 1:45 PM on May 31, 2010


Response by poster: Ugh. Yes. I did try the plugin. That's what started this whole thing.

I'd much rather go that route, but it completely borked the blog. Typepad was no help when it did (that, specifically, is what spawned the help ticket I opened with them.) And so I went this route.

So I can see where that might be it, definitely... but on the other hand, it does work in more than half the cases. ...
posted by veggieboy at 1:57 PM on May 31, 2010


Here's the problem: in your second post, Gale Gand, you've entered the Movable Type token for a permalink in quotes:

<iframe src="http://www.facebook.com/widgets/like.php?href=<$MTEntryPermalink encode_url="1"$>"...etc..

And so the double quotes cancel each other out, and ends up not being converted by the MT engine. The answer is to use single quotes for the encode_url parameter, as such:

<iframe src="http://www.facebook.com/widgets/like.php?href=<$MTEntryPermalink encode_url='1'$>"

Which will then turn into something like


<iframe src="http://www.facebook.com/widgets/like.php?href=http%3A%2F%2Fwww.waffleizer.com%2Fwaffleizer%2F2010%2F04%2Fgale-gand.html" ...etc etc etc


I suspect that when you're hand-entering the link, you're alternating between using single quotes and double quotes, and that's why it's working on some links, and not the others.
posted by suedehead at 3:17 PM on May 31, 2010


Response by poster: Suedehead, I was screwing with things a little and you must have caught me when I had it set up differently for a few minutes. I'm really sorry about that. I'll screw with a post that I DIDN'T link to here next time. Very dumb on my part.

Anyway, what I did was (very briefly) went back to the Typepad-recommended code that uses the syntax you have above, which never worked for me, and continues not to work for me. I would very much like to use that, because then it just fetches the URL automatically. But I've never gotten that work. (I tried the syntax you have above; didn't work.)

So what I settled on was hardcoding the links. Which, like I said, does work much of the time, just not always.

So in the case of a post where it does NOT work, it looks like this:

<iframe src='http://www.facebook.com/plugins/like.php?href=http%253A%252F%252Fwww.waffleizer.com%252Fwaffleizer%252F2010%252F04%252Fgale-gand.html&layout=standard&show_faces=false&width=450&action=like&font&colorscheme=light&height=35' scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowtransparency="true"></iframe>

In the case of a post where it DOES work, it looks like this:

<iframe src="http://www.facebook.com/plugins/like.php?href=http%253A%252F%252Fwww.waffleizer.com%252Fwaffleizer%252F2010%252F03%252Fwaffled-chocolate-chip-cookies.html&layout=standard&show_faces=false&width=450&action=like&font&colorscheme=light&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
posted by veggieboy at 3:54 PM on May 31, 2010


Response by poster: Hmmm.. now I see that there is a double/single quote issue there... Posted prematurely.
posted by veggieboy at 3:57 PM on May 31, 2010


Response by poster: Sigh. I know this is rapidly becoming one of those threads where the OP just talks to himself, but here's the correct copy of the syntax that does NOT not work. I just don't see the difference between the one that works and the one that doesn't.

<iframe src="http://www.facebook.com/plugins/like.php?href=http%253A%252F%252Fwww.waffleizer.com%252Fwaffleizer%252F2010%252F04%252Fgale-gand.html&layout=standard&show_faces=false&width=450&action=like&font&colorscheme=light&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
posted by veggieboy at 4:06 PM on May 31, 2010


Er, that last one seemed to work for me. What do you mean that it doesn't work? Does the button not appear in the first place?
posted by suedehead at 4:19 PM on May 31, 2010


Response by poster: The button does appear. And then when I click on it, it appears to work for a second. And then comes back with "error." And when I click on the error for an explanation, it says that the URL cannot be reached.

Especially because it works for you, I'm beginning to suspect it's what is discussed here in this Facebook forum post I just came across.

The solution seems to be to wait a few (12? 24?) hours. Which is convenient because I need to spend at least 12 hours not thinking about all this.

Thank you very much for the help. I'll update tomorrow morning and see if things have resolved themselves.
posted by veggieboy at 4:29 PM on May 31, 2010


Response by poster: Well, for anyone still following along, it seems not to have resolved itself unfortunately.

At this point I'm just going to be taking down the buttons from the posts where it doesn't work and being grateful that it works on the ones it does.
posted by veggieboy at 8:53 PM on June 1, 2010


Well looks like the bug might not be your fault, and is still ongoing, so maybe you should just check the bug report thread periodically and try it when it's back up?
posted by suedehead at 2:43 AM on June 4, 2010


« Older How to calculate orifice diameter for laminar flow...   |   Where to find a database of all movies made? Newer »
This thread is closed to new comments.