开发者

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}&amp;href={myAppURL}&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=dark&amp;font&amp;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}&amp;href={myAppURL}&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=dark&amp;font&amp;height=21" 
  scrolling="no" frameborder="0" 
  style="border:none; overflow:hidden; width:450px; height:21px;" 
  allowTransparency="true">
</iframe>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜