当前位置: 动力学知识库 > 问答 > 编程问答 >

upload and attach a photo to a facebook note

问题描述:

I am trying to attach a photo to a facebook note with the following code

$attachment = array(

'message' => 'photo caption',

'subject' => 'photo subject',

'id' => $note_id

);

$attachment[basename($file_path)] = '@' . realpath($file_path);

$result = $facebook->api('/notes', 'POST', $attachment);

which generates an error code: Uncaught OAuthException: (#100) Requires extended permission: create_note

note_id is holding a correct note_id which is created above with the following code:

$note = $facebook->api('/notes', 'POST', array(

'access_token' => $token,

'subject' => 'subject',

'message' => 'message'

));

$note_id = $note{'id'};

facebook note api reference https://developers.facebook.com/docs/reference/api/note/ doesn't provide much details on this task. plz help.

分享给朋友:
您可能感兴趣的文章:
随机阅读: