上传并将照片附加到Facebook便笺上

时间:2013-11-21 00:09:15

标签: facebook facebook-graph-api photo

我正在尝试使用以下代码将照片附加到Facebook便条

$attachment = array(                                                                              
 'message' => 'photo caption',                                                                    
 'subject' => 'photo subject',                                                                    
 'id' => $note_id                                                                                 
);                                                                                                

$attachment[basename($file_path)] = '@' . realpath($file_path);                                   
$result = $facebook->api('/notes', 'POST', $attachment); 

生成错误代码:Uncaught OAuthException:(#100)需要扩展权限:create_note

note_id持有正确的note_id,上面使用以下代码创建:

$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/没有提供有关此任务的更多详细信息。请帮助。

0 个答案:

没有答案
相关问题