这段代码的平静给了我50x50px的Facebook个人资料图片.显然我需要一个更大的.我怎么才能得到它?
正在搜索SO,只找到了2010-2013的答案
$response = (new FacebookRequest(
$session,
'GET', '/me?fields=picture,link'
)
)->execute();
$object = $response->getGraphObject();
$pic = $object->asArray('picture');
$pic = $pic['picture']->data->url;
echo '<img src="'.$pic.'" alt="..." />';
Run Code Online (Sandbox Code Playgroud)
抛出错误:
'GET', '/me?fields=picture{width(300)},link'
// Syntax error "Expected end of string instead of "("." at character 5: width(300)
Run Code Online (Sandbox Code Playgroud)