这是我的代码:
$this->session = new Facebook\FacebookSession(ACCESS_TOKEN);
$response_pic = (new Facebook\FacebookRequest(
$this->session, 'GET', '/'.ID_PAGE.'/picture'))->execute()->getGraphObject();
var_dump($response_pic);
var_dump
结果是:
object(Facebook\GraphObject)#19 (1) { ["backingData":protected]=> array(0) { } }
我需要获取个人资料图片,但回复是:
" backingData":保护
我该如何解决这个问题?
答案 0 :(得分:0)
您可以将图片用作网页的字段,因此请求可以是:
$response_pic = (new Facebook\FacebookRequest(
$this->session, 'GET', '/'.ID_PAGE, ['fields' => 'picture'])->execute()->getGraphObject()