我使用的是Facebook PHP SDK 3.1.1,一個iFrame應用程序可以發佈在已登錄的用戶牆上,已經是該頁面的粉絲。Facebook iFrame應用程序PHP SDK 3.1.1 - 發佈在牆上
以下是安科,這讓我錯誤「致命錯誤:未捕獲OAuthException:(#200)的用戶無權執行此操作中拋出的應用程序」
/*post starts*/
$attachment = array('message' => 'test message',
'name' => 'test app!',
'caption' => "Caption of the Post",
'link' => 'http://apps.facebook.com/phpsdk_demoapp/',
'description' => 'It is fun!',
'picture' => 'http://www.takwing.idv.hk/facebook/demoapp_phpsdk/img/logo.gif',
'actions' => array(array('name' => 'Start Learning',
'link' => 'http://www.takwing.idv.hk/tech/fb_dev/index.php'))
);
$result = $facebook->api('/me/feed/',
'post',
$attachment);
/*post ends*/
我猜的部分必須獲得用戶的許可才能在牆上發佈信息,敬請諒解。 感謝
很明顯,您是在不理解以下內容的情況下複製文章或論壇中的代碼。我建議你先閱讀基礎知識([認證](http://developers.facebook.com/docs/authentication/)和[圖api])(https://developers.facebook.com/docs/reference/api/ )) – ifaour