takeit
takeit

Reputation: 4081

Can't access Facebook Debugger Tool response

I'm trying to clear cache of my post on facebook.

I do something like that:

$browser = new \Buzz\Browser($curlClient);
        $response =  $browser->post('http://developers.facebook.com/tools/debug', array(
            'user_agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.A.B.C Safari/525.13'
        ), http_build_query(array(
            'q' => $url
        )));

but the response content doesn't return any data from that tool. It needs me to log in. I used it before and it worked fine, something changed ? how to solve it ?

Upvotes: 1

Views: 173

Answers (1)

takeit
takeit

Reputation: 4081

If someone will need it, I solved it like that:

$result = $browser->post('https://graph.facebook.com/?id='.$url.'&scrape=true');
$urlInfo = json_decode($result->getContent(), true);

where $url is link to my blog post.

Upvotes: 1

Related Questions