Facebook like button issue
We're having some trouble getting our like button to work. It seemed to work last week but suddenly it's stopped working.
Basically when clicking "Like", we get an error saying:
You failed to provide a valid list of administators. You need to supply the administors using either a "fb:app_id" meta tag, or using a "fb:admins" meta tag to specify a comma-delimited list of Facebook users.
Our <head>
section looks like this:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en" lang="en">
<head>
<meta property="fb:app_id" content="number"/>
<meta property="fb:admins" content="number"/>
<meta property="og:title" conte开发者_Python百科nt="title"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="url with trailing slash"/>
<meta property="og:image" content="url to image"/>
<meta property="og:site_name" content="Site Name"/>
</head>
Here are one method to solve your problem: -
1 Go to https://developers.facebook.com/tools/lint/ 2 In the Input URL paste your page URL where the like button is not working (e.g http://www.mywebsite.com/my-article/) 3 Click the Lint button That should do, now you can go and visit your page to try the Like button. 4 IF it still does not work, when the Lint tool shows you the result. Scroll all the way down and you will see that there is a Like button. 5 Click that Like button (basically you are liking the flawed page) That should solve it. If not, then you probably have to wait for facebook to fix it.
http://developers.facebook.com/docs/opengraph
In addition, we've extended the basic meta data to add one required field to connect your page with :
- fb:admins or fb:app_id - A comma-separated list of either Facebook user IDs or a Facebook Platform application ID that administers this page.
The solution to this is to use the fb namespace instead of the og namespace:
fb:admins
fb:app_id
Even thought all the meta tags are in the og namespace, these two are not! It makes sense semantically, but given how spotty the Facebook docs are (in terms of typos and old info), I think it's really easy to assume that it should be og (as I did as well!).
Make sure you also add the namespace declarations to your html tag for IE6!
Check two things first:
- If your application is without sandbox mode activated.
- If sandbox is OFF, go to Developers Link at Apps page. If the user that you selected is not there, try to put and save the app.
It may be the answer for your question.
Change
<meta property="og:type" content="website"/>
to
<meta property="og:type" content="article"/>
Had the same issue until made this change (bug?).
精彩评论