2011-09-16 147 views
0

我試圖發佈到我的Facebook羣組牆上,但我一直在獲取上述錯誤。任何人都可以告訴我,我可能在這裏做錯了嗎?我已經檢查了Facebook的文檔,但我仍然無法自己修復它。我的代碼如下:未捕獲的OAuthException:(#200)用戶未授權應用程序執行此操作

$facebook = new Facebook(array(
    'appId' => $app_id, 
    'secret' => $app_secret, 
    'perms' => 'offline_access, user_groups, publish_stream', 
    'cookie' => true 
)); 


$result = $facebook->api(
    '/xxxxxxxxxgroupid/feed/', 
     'post', 
     array('access_token' => $facebook->getAccessToken(), 'message' => 'Playing around with FB Graph..') 
); 

回答

0

我想你需要user_groups擴展權限。

0

嘗試使用之前,該工作前人的精力精細

try { 
     $params = array(
      'message'  => "Hurray! This works :)", 
      'name'   => "This is my title", 
      'caption'  => "My Caption", 
      'description' => "Some Description...", 
      'link'   => "http://stackoverflow.com", 
      'picture'  => "http://i.imgur.com/VUBz8.png", 
     ); 

     $post = $facebook->api("/$user/feed","POST",$params); 

     echo "Your post was successfully posted to UID: $user"; 

    } 
    catch (FacebookApiException $e) { 
     $result = $e->getResult(); 
    } 
相關問題