Facebook I like button not working all the time

Mathias F picture Mathias F · Feb 11, 2011 · Viewed 18.7k times · Source

I have used the following code to implement the like - button:

Header

<!-- Facebook Metatags -->
<meta property="og:image" content="http://mysite/logo.gif"/>
<meta property="og:locality" content="mycity"/>
<meta property="og:country-name" content="Germany"/>
<meta property="og:latitude" content="52.xxxxxxx"/>
<meta property="og:longitude" content="9.xxxxxxx"/>
<meta property="og:type" content="product"/>
<meta property="og:site_name" content="mypage.com"/>
<meta property="og:url" content="http://mypage.de/myproduct/myproductkey"/>
<meta property="og:title" content="Myproduct Description"/>

Body on mypage.de/myproduct/myproductkey

<div id="facebook-likebox">
<script src="http://connect.facebook.net/de_DE/all.js#xfbml=1"></script>
<fb:like href="http://mypage.de/myproduct/myproductkey" width="450" height="90" show_faces="false"></fb:like>
</div>

The result is inconsistent: Most of the time it works, but sometimes I get this error:

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.

This error makes no sense because when I call the page later or somebody else calls the page it works again. Any idea what is wrong here.

EDIT

I updated the site with these meta tags

<meta property="fb:admins" content="xxx"/>
<meta property="fb:app_id" content="xxx"/>

I rechecked the ids on https://graph.facebook.com/xxx

But I still get get errors sometimes. The new error is:

The app ID "xxx" specified within the "fb:app_id" meta tag was invalid.

But most of the time everyrthing works. Does anybody have any idea on how to solve this issue?

EDIT 1

Our site uses a load balancer and has a lot of external scripts (E-Tracker and other tracking solutions)

EDIT 2

We used LINT https://developers.facebook.com/tools/lint/ to check the page

It gives sometime an error (invalid app_id )and sometimes returns as valid. But the app-id from the meta-tags is allways parsed correctly and it is the valid app-id.

Answer

ifaour picture ifaour · Feb 11, 2011

The Facebook Like Plugin requires six attributes when using the open graph meta tags:

  • og:title - The title of the entity.
  • og:type - The type of entity. You must select a type from the list of Open Graph types.
  • og:image - The URL to an image that represents the entity. Images must be at least 50 pixels by 50 pixels. Square images work best, but you are allowed to use images up to three times as wide as they are tall.
  • og:url - The canonical, permanent URL of the page representing the entity. When you use Open Graph tags, the Like button posts a link to the og:url instead of the URL in the Like button code.
  • og:site_name - A human-readable name for your site, e.g., "IMDb".
  • fb:admins or fb:app_id - A comma-separated list of either the Facebook IDs of page administrators or a Facebook Platform application ID. At a minimum, include only your own Facebook ID.

So just add your facebook ID:

<meta property="fb:admins" content="your_FB_ID"/>