0
我想發送消息給多個用戶。我不知道我做錯了什麼。Facebook發送消息給多個用戶
但它只能運行JavaScript測試控制檯。
這是我的代碼:
<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>
感謝朋友。但是JavaScript測試控制檯將允許多個用戶。 – 2013-03-02 21:20:24