Facebook Graph API:创建/更新活动图片不起作用

时间:2013-06-06 14:13:36

标签: facebook api events image

我想按照Event API

中的说明更新活动图片
$eventId = '291145580981541';
$accessToken = $facebook->getAccessToken(); // have tested, is correct
$data = array('source' => '@'.realpath($file));

try {
    $result = $facebook->api('/$eventId/picture?access_token=$accessToken', 'POST', $data);
    echo $result;
} catch(Exception $e) {
    echo "Exception: $e";
}

我得到的结果:

Exception: OAuthException: (#200)

我做错了什么?

1 个答案:

答案 0 :(得分:0)

错误#200是权限错误。您很可能没有create_event权限

https://developers.facebook.com/docs/reference/api/event/#picture