我使用此代码向我的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');
}
});
}发布于 2012-05-15 13:33:39
好吧,这没有任何意义,但这段代码运行良好。
我从前面的页面中删除了加载的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
});发布于 2012-05-14 05:20:34
看起来你使用过滤器的方式是错误的。
PS:假设你的回调函数是正确的
https://stackoverflow.com/questions/10574395
复制相似问题