我正在使用此代码发布到我的应用程序页面:
$page_info = $facebook->api("/344722062246773?fields=access_token");
$attachment2 = array('message' => $row["nwmsg"],
'access_token' => $page_info['access_token'],
'name' => $row["nwnm"],
'caption' => $row["nwsubject"],
'picture' => 'http://itradegame.com/itrade/' . $row["nwposter"],
'description' => $row["nwtext"],
'actions' => array(array ('name'=>'Play!','link'=>'https://apps.facebook.com/itradee/')));
$result = $facebook->api('/344722062246773/feed/','post',$attachment2);
但问题是我正在安排此代码在特定时间内使用cron作业运行并且我收到此错误:
Fatal error</b>: Uncaught OAuthException: (#200) The user hasn't authorized the application to perform this action
投入
但如果我从浏览器手动运行包含此代码的页面,则可以正常工作。
此代码中缺少什么?
答案 0 :(得分:0)
好吧,我知道了,我认为发布流权限可行,但我还需要offline_access权限。