问题
I added a standard Like button to my website. The code is
<div class="fb-like" data-href="mccabece.com"; data-send="true" data-width="450" data-show-faces="true"></div>
When I click the "Like" button it says I like it, but then gives a red "error" beside it. The error says - The page failed to provide a valid list of administrators. It needs to specify the administrators using either a "fb:app_id" meta tag, or using a "fb:admins" meta tag to specify a comma-delimited list of Facebook users. - When I refresh the website, it doesn't show that I've "Liked" it. Any ideas?
回答1:
I am not sure what caused that exact error you mentioned...but I found some possible issues:
First, why do you have a ; character in there?
Secondly, the url you are using is not valid (this is most likely the cause of the error): use http://mccabece.com instead.
And lastly, I notice you have set data-send="true"...here's what the facebook api says "send - specifies whether to include a Send button with the Like button. This only works with the XFBML version." Make sure you set everything correctly to use that.
Edit:
About the app id, check out this link https://developers.facebook.com/docs/reference/plugins/like/
You can see the code they give uses the app id.
You can create a new app here, from your facebook account: https://developers.facebook.com/apps and use the id from there.
回答2:
To get through this i had to log out of my facebook account - then went to the https://developers.facebook.com/apps page and generated the "like button" code - embedded it on my site. After all this i then clicked on the like button and i was prompted to login to my facebook account by a window pop-up - which i did. I was then after presented with a like button box amongst other few things - i then clicked on the like button again and the window disappeared. Back on my site the like button was now urging me to "confirm" which i did.From here it went back to normal with no "error" like the former times.
来源:https://stackoverflow.com/questions/9045825/facebook-like-button-error