0

私のアプリにauto_publishを実装しようとしています。ログインボタンをクリックすると、 'publish_stream'権限が要求されます。ユーザーのFacebookの壁にグラフAPIを自動公開する

ログインに成功すると自動的にユーザーの壁に公開されるようです。ここに私のコード:

  function graphStreamPublish(){ 
      showLoader(true); 
      FB.api('/me/feed', 'post', publish, 
       { 
        message  : "Merry Christmas!", 
        link  : 'http://domain.com', 
        picture  : 'http://domain.com/xxxx.jpg', 
        name  : 'Happy Christmas', 
        description : 'Send a Christmas greeting!' 

      }, 
      function(response) { 

       console.log(response); 
       alert('Shared!'); 

      }); 
     } 
+0

コールバックで 'console.log(response)'を試しましたか? –

+0

@AhmedNuamanはconsole.log(レスポンス)を追加しましたが、まだ役に立たなかった:( – doodoodukes

+0

何が返されますか?何が起きているかのステータスメッセージを表示する必要があります –

答えて

0

あなたのFB.loginは何ですか?

FB.login(function(response) { 
    if (response.authResponse) { 
    FB.api('/me', function(response) { 
     //YOU CAN PUT YOUR POSTING CODE HERE 
    }); 
    } else { 
    console.log('User cancelled login or did not fully authorize.'); 
    } 
}, {scope: 'email'}); 
+0

私のコードでそのチャンクをすでに持っていますが、私はそれを表示しませんでした。ログイン時に 'publish_stream'許可リクエストがあります。 – doodoodukes

関連する問題