我正在使用此代码向我的Facebook应用程序中的用户发送应用程序请求
<script src="https://connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId: '39764546513545342',
status: true,
cookie: true,
oauth: true
});
};
function invitetoevent(rid)
{
FB.ui({
method: 'apprequests',
message: 'i\'ll see you in this event.',
title: 'Lets Go!.',
filters: ['app_users'],
max_recipients: 25,
},
function (response) {
if (response.request && response.to)
{
//actions
}
else
{
//alert('canceled');
}
});
}
答案 0 :(得分:0)
答案 1 :(得分:0)
它没有任何意义,但这段代码工作正常。
我从上一页删除了facebook脚本加载并使用了此代码。
window.fbAsyncInit = function() {
FB.init({
appId : '397334655643214', // App ID
channelUrl : '//www.itradegame.com/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});