Take the 2-minute tour ×

When I create a new web page with a Like button and access the page for the first time, the button doesn't show the og:title or og:description data, or the og:image that I've specified. I have to scrape the page manually first by running it through the Facebook debugger at https://developers.facebook.com/tools/debug.

My understanding is that Facebook scrapes the page every 24 hours automatically and if you want changes to show up sooner you have to scrape it yourself by running it through the debugger. But doesn't Facebook scrape the page once the first time you call the Like button on it, so I shouldn't have to scrape it the first time?

I should mention that the button code is not generated fresh by calling the Facebook button page at


Instead, the web page that gets the Like button is being generated by a site builder that I developed. When the user selects a Like button icon to put on the page, code from a previously generated button is patched to contain the new site name, etc.

Also, it's an XFMBL button, if that matters.

The best solution I could hope for, I guess, would be a way to call the Facebook debugger programatically from PHP with the URL to scrape in the query string, and the debugger would just do it without opening up any kind of a user dialog.

Thanks for any ideas.

share|improve this question
Maybe related to stackoverflow.com/questions/21397703/… –  Reeno Feb 6 at 11:37
add comment

1 Answer

up vote 1 down vote accepted

You can use this code to send it to the debbugger when you generate the like button:

$curlUrl = 'https://developers.facebook.com/tools/debug/og/object?q=' .
    urlencode(your like link);
$params = array(
    'id'           => $curlUrl,
    'scrape'       => 'true',
    'access_token' => $access_token
$ch = curl_init('https://graph.facebook.com');
curl_setopt_array($ch, array(
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => $params
$result = curl_exec($ch);
share|improve this answer
add comment

Your Answer


