2013-08-02 37 views
1

我想通過我的網站在Facebook上發佈帖子。我需要在Facebook上發佈所有權限?

我擁有這些權限

'scope' => 'read_stream, email, publish_stream, user_birthday, user_location, user_work_history, user_hometown, user_photos', 

但我不能發佈職位。下面是我不能發佈的示例。

if(isset($_POST['publish'])){ 
    try{ 
     $statusUpdate = $facebook->api("/$user/feed", 'post', array(
      'message'  => 'Message here', 
      'link'   => 'webiste link here', 
      'picture'  => 'image link here', 
      'name'   => 'Heading', 
      'caption'  => 'example.com', 
      'description' => 'bla bla bla bla', 
      )); 
    }catch(FacebookApiException $e){ 
     error_log($e); 
    } 
} 

但我能夠成功地發佈簡單的職位(狀態),只有消息

if(isset($_POST['status'])){ 
    try{ 
     $statusUpdate = $facebook->api("/$user/feed", 'post', array('message'=> $_POST['status'])); 
    }catch(FacebookApiException $e){ 
     error_log($e); 
    } 
} 

任何一個可以告訴我,我需要哪些額外的許可或什麼,我缺少什麼?

與圖形API我得到這個錯誤

{ 
    "error": { 
    "message": "(#100) The post's links must direct to the application's connect or canvas URL.", 
    "type": "OAuthException", 
    "code": 100 
    } 
} 

在我error_log.php我發現這個

OAuthException:(#100)帖子的鏈接必須直接到應用程序的連接或帆布URL。

+0

什麼錯誤抓? – Raptor

+0

我加在上面我的問題錯誤,當我嘗試用圖形API – deerox

+0

嘗試設置「流發佈網址安全」爲假的應用程序設置 – Raptor

回答

1

要解決的錯誤:(#100) The post's links must direct to the application's connect or canvas URL.,你必須「流發佈網址安全性」設置爲應用程序設置

旁註:你不需要user_birthday和他人發佈的資訊提供。只有publish_stream是必需的。

相關問題