facebook apprequests:发生错误。请稍后再试

时间:2012-05-13 19:03:06

标签: php javascript jquery facebook facebook-graph-api

我正在使用此代码向我的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');
                        }
});

}

2 个答案:

答案 0 :(得分:0)

看起来你使用过滤器的方式是错误的。

<强> DEMO

PS:假设您的回调功能正确

答案 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
});