javascript - Facebook send message to multiple users -
javascript - Facebook send message to multiple users -
i want send message multiple users. don't know did wrong.
but can run javascript test console.
this code:
<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 login status upon init? cookie : true, // set sessions cookies allow server access session? xfbml : true, // parse xfbml tags on 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>
method send
doesn't allow multiple user ids in to
field. code allows 1 id
. users can come in additional recipients in dialog.
javascript facebook-javascript-sdk
Comments
Post a Comment