2013-02-19 6 views
0

여러 명의 사용자에게 메시지를 보내려고합니다. 내가 뭘 잘못했는지 모르겠다.Facebook에서 여러 사용자에게 메시지 보내기

하지만 JavaScript 테스트 콘솔 만 실행할 수 있습니다. to 분야에서 여러 사용자 ID를 허용하지 않습니다 send

<html> 
<body > 
    <div id="fb-root"></div> 
    <script src="http://connect.facebook.net/en_US/all.js"></script> 
    <script> 
     window.fbAsyncInit = function() { 
      FB.init({ 
       appId  : 'MY APP ID', 
       status  : true, // check the login status upon init? 
       cookie  : true, // set sessions cookies to allow your server to access the session? 
       xfbml  : true, // parse XFBML tags on this page? 
       oauth: true // enable OAuth 2.0 

      }); 
     }; 

     (function(d, debug){ 
      var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; 
      if (d.getElementById(id)) {return;} 
      js = d.createElement('script'); js.id = id; js.async = true; 
      js.src = "//connect.facebook.net/en_US/all" + (debug ? "/debug" : "") + ".js"; 
      ref.parentNode.insertBefore(js, ref); 
     }(document, /*debug*/ false)); 

     function sendmsg(){ 
      FB.ui({ 
       method: 'send', 
       to: ['100000793830311','100002551899151'], 
       name: 'test msg', 
       link: 'http://www.google.com' 
      }); 
     }  
    </script> 

    <button onclick="sendmsg();">SEND</button> 
</body> 

답변

0

방법 :

이 내 코드입니다. 코드는 하나만 허용합니다. id. 사용자는 대화 상자에 추가 수신자를 입력 할 수 있습니다.

+0

고맙습니다. 그러나 JavaScript Test Console은 여러 사용자를 허용합니다. –

관련 문제