开发者

Facebook like button unlike itself

I added facebook like button on my site. Everything is working fine two days before but now I m getting error when I clicked like button it gets liked and after 2-3 seconds it unlikes itself automatically. After finding on net I found facebook linter tool but problem is that when I put page's url in it and run it, that page's like button starts working fine. So what's wrong with my site why this is happening and what linter tool do. Please help me.

This is t开发者_如何学Gohe code that I used:

<iframe src="http://www.facebook.com/plugins/like.php?href=<?php $pageurl ?>&amp;send=false&amp;layout=button_count&amp;width=80&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowTransparency="true"></iframe>

In above code $pageurl is changes according to page.

Thanks......


Man I was trying to figure this out till 3am last night, because none of the solutions worked :/ ... it ended up working for me by changing 1 minor setting.

Solution: Try using the "Live feed" app ID rather than the default "Live Stream" when you're getting your code from the facebook developers page.


The code is perfect but there is problem on Facebook's end. I faced the same problem, this solution worked for me - FIX: Facebook Like Button Unlikes Itself.


Running the page through the linter is not a good solution in this person's case since the URL changes. I for example have thousands of articles on my site. The URL contains an article ID. There is now way I am going manually feed each of these pages through the Facebook linter.

There needs to be a better fix.


There's an easy fix for any page that has a broken facebook button that unlikes itself when clicked. Just copy the URL of your page and enter it in the Facebook LINTER tool here:

Facebook LINTER -> https://developers.facebook.com/tools/lint

I'm not sure of the exact details of why this works, but from what I've been able to gather, when you run the LINTER tool on your URL it will also update the cache facebook has for your URL. The error with the button working is on the facebook side, so by running this tool and getting facebook to update their cached data for your page, the like button starts working again. I've seen this broken facebook button occur for a few different reasons, one being that a page used to use the old facebook share button. When you add the new like button to a page that used to use a share button, the like button won't work until you run the page through the linter.

Bottom line is doing this will fix your like button. If your facebook button doesn't work on a page, run it through the LINTER tool. Hope this helps!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜