2011-07-23 7 views
1

ユーザーがステータスを公開したり「スキップ」をクリックしたときに、stream.shareが返されるのはなぜですか?stream.share returns undefined

私は現在これを使用しようとしています。そのため、ユーザーがコンテンツを公開しない場合、アクションは実行されませんが、ユーザーがコンテンツを公開すると、アクションが発生します。

どうすればよいですか?

答えて

1

あなたが投稿を公開し、それが利用者によって公開されたかどうかを知るために、グラフAPIフィードダイアログを使用することができます。

FB.ui(
    { 
     method: 'feed', 
     message: '', 
     name: 'name here', 
     caption: 'caption here', 
     description: 'description here', 
     picture: 'picture url here', 
     link: 'http://yourlinkurlhere.com', 
     actions : [{name : 'action name', link : 'action link'}] 
    }, 
    function(response) { 
     if (response && response.post_id) { 
      // Post was published 
     } else { 
      // Post did get published 
     } 

});