我想按照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)
我究竟做错了什么?