【问题标题】:Facebook Invite Gate - What code do I need to add?Facebook Invite Gate - 我需要添加什么代码?
【发布时间】:2013-07-05 15:28:27
【问题描述】:

我在编程方面仍然是个菜鸟,如果解决方案显而易见,请原谅我。

我同时设法在 FB 开发者的网站上找到了这个功能:

function sendRequestViaMultiFriendSelector() {
    FB.ui({method: 'apprequests',
      message: 'My Great Request',
      redirect_uri: 'http://www.google.com',

    }, requestCallback);
  }

并通过调用该函数弹出实际窗口。

现在我缺少的是如何确保用户确实邀请了某人,如果他确实将他转发到页面 a,如果没有将他转发到页面 b?

提前致谢。

-Gerd

【问题讨论】:

  • 您是否查看了该函数返回的文档?你应该可以从中弄清楚
  • 感谢您指出正确的方向。

标签: facebook facebook-graph-api


【解决方案1】:

Igy 为我指出了正确的方向,我基本上在这里找到了我想要的东西:

"Request Dialog" requestCallback when clicking Cancel or Close button

因此对于每个需要类似门的人来说,这将是要使用的代码:

function sendRequestToManyRecipients() {

    FB.ui({method: 'apprequests',
      message: 'My Great Request',

    }, requestCallback);
  }

  function requestCallback(response) {
   if(response && response.request) {
     // Here, requests have been sent, facebook gives you the request and the array of     recipients
     //console.log(response);
     location.href='success.php';
} else {
     location.href='cancel.php';
}

希望有帮助!

干杯,

格德

【讨论】:

    猜你喜欢
    • 2013-04-01
    • 2021-12-01
    • 1970-01-01
    • 2016-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-24
    • 2012-08-04
    相关资源
    最近更新 更多