2010-12-03 7 views
4

に私は、ユーザーの友人の壁に何かを投稿するJavascriptのSDKを使用しています:Facebookの - ポスト複数の友人の壁

var publish = 

    { 
       method: 'stream.publish', 
       message: 'Some kind of test', 
       uid: uid, 
       target_id: friendID, 
       attachment: { 
       name: 'Test', 
       caption: 'Facebook API Test', 
       description: ('Sure hope it worked!'), 
       href: 'http://www.test.com/', 
       media: [ 
        { 
        type: 'image', 
        href: 'http://test.com/', 
        src: 'http://test.com/image.jpg' 
        } 
       ] 
       }, 
       action_links: [ 
       { text: 'Enigma Marketing', href: 'http://www.test.com/' } 
       ], 
       user_prompt_message: 'Share your thoughts about test' 
      }; 

      FB.ui(publish); 
      return false; 

それは大丈夫働いているが、私はに投稿できる道があった場合、私は思っていました複数の友達の壁?私はポップがリストの中でターゲットの友人を少ししか示していないことに気付きました。だから、複数のユーザーに投稿を公開することは可能かもしれません。私はドキュメンテーションで何かを見つけることができない、どんな助けも大いに評価されるだろう。

答えて

5

いいえ、1回のコールで複数の友達のストリームに投稿することはできません。

これを行う最善の方法は、おそらくサーバー側であり、ユーザーは複数のプロンプトを表示しないようにすることです。スパムとして認識される可能性があるので、通常これは推奨されません。あなたのコードで

、単に送信イベントの一部にすることができますが、ループ:

var publish = 

{ 
      method: 'stream.publish', 
      message: 'Some kind of test', 
      uid: uid, 
      attachment: { 
      name: 'Test', 
      caption: 'Facebook API Test', 
      description: ('Sure hope it worked!'), 
      href: 'http://www.test.com/', 
      media: [ 
       { 
       type: 'image', 
       href: 'http://test.com/', 
       src: 'http://test.com/image.jpg' 
       } 
      ] 
      }, 
      action_links: [ 
      { text: 'Enigma Marketing', href: 'http://www.test.com/' } 
      ], 
      user_prompt_message: 'Share your thoughts about test' 
}; 

publish.target_id = friendID; 
FB.ui(publish); 

publish.target_id = friendID; 
FB.ui(publish); 

     return false; 
関連する問題