1

私は自分のウェブサイトを介して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);
    }
}

追加の許可が必要か、不足しているものを誰か教えてもらえますか?

Graph 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 またはキャンバス URL を指している必要があります。

4

1 に答える 1

1

エラー: に対処するには、アプリ設定で(#100) The post's links must direct to the application's connect or canvas URL.「Stream Post URL Security」をfalseに設定する必要があります。

user_birthday補足:フィードを公開する必要はありません。のみpublish_streamが必要です。

于 2013-08-02T07:33:00.750 に答える