Facebook like button stopped working
I started having problems a couple of days ago with the Like button on my Facebook application page. It has been working for almost 6 months but stopped working yes开发者_StackOverflow社区terday. When I am logged into my own Facebook account I see the 'Like' count, but if I am logged out or logged in as anyone who hasn't already 'Liked' my app, it doesn't work. They see the button as if nobody has 'liked' it yet and when they click it, it seems to reset every time.
The URL I am trying to like is an APP URL. My code is pasted below.
<iframe src="http://www.facebook.com/plugins/like.php?app_id={myAppId}&href={myAppURL}&send=false&layout=button_count&width=450&show_faces=false&action=like&colorscheme=dark&font&height=21"
scrolling="no" frameborder="0"
style="border:none; overflow:hidden; width:450px; height:21px;"
allowTransparency="true">
</iframe>
I've tried a few variants of this code, but I can't seem to get it to work. Even when I go to the page that generates 'Like' button code on Facebook and give it my URL, I see the same problem. When I click the button I get the text "Error" in red to the right of the button. I've seen an article on Mashable that this same problem happened about a year ago for some people...
Try replacing the http://
part of the src
attribute with //
So it should look like this:
<iframe src="//www.facebook.com/plugins/like.php?app_id={myAppId}&href={myAppURL}&send=false&layout=button_count&width=450&show_faces=false&action=like&colorscheme=dark&font&height=21"
scrolling="no" frameborder="0"
style="border:none; overflow:hidden; width:450px; height:21px;"
allowTransparency="true">
</iframe>
精彩评论