如何查看特定用户发送的Facebook应用邀请数? [英] How to check number of facebook app invitation sent by a particular users?

查看:95
本文介绍了如何查看特定用户发送的Facebook应用邀请数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想鼓励我的Facebook应用程序用户邀请更多朋友加入该应用程序.因此,在邀请50个以上的朋友之后,我会让他们自由使用我的应用程序(无论他们的朋友是否加入该应用程序都可以).

I would like to encourage my facebook app users to invite more friends to join the app. Therefore, I will let them freely use my app after they invite more than 50 friends (no matter their friends join the app or not is also ok).

但是问题是:如何检查该用户发送的邀请数量?

But the problem is: how can I check the number of invitation sent by that users?

谢谢.

Rgds

推荐答案

facebook中没有内置选项.

there is no built in option in facebook for this.

无论我们何时发送请求,我都会使用 FB请求对话框 facebook将返回一组请求ID(如果有多个同时请求).

I'm using the FB request dialog and whenever we send request facebook will return a set of request id's (in case of multiple simultaneous requests) .

然后只有一个自己的表,说"tbl_requests",您可以在其中用Facebook对话框返回的request_id更新当前的user_id.好处是,当被邀请人接受邀请时,您可以回溯这些request_id.

And then just have your own table say 'tbl_requests' where you can update the current user_id with the request_id returned by the facebook dialog.. The advantage is that you can then backtrack these request_ids when the invited person accepts his invitation.

示例代码可能是

function invite(){
var receiverUserIds = FB.ui({ 
 method : 'apprequests',
 message: 'just a invite msg'
 title: 'Select your friends to join the app',
},
function(receiverUserIds) {
 if(receiverUserIds){  
  $.ajax({
       type: "POST",
       url: "your_file.php",
       req_ids="+receiverUserIds.request_ids,
  });
 }
}
);                 
}

在your_file.php中处理您的request_ids并将其存储在db上,然后每当您要计算发送的请求数时,都可以使用当前的user_id进行查询

In your_file.php process your request_ids and store them on db and then whenever you want to count the no of request sent you can just query with the current user_id

这篇关于如何查看特定用户发送的Facebook应用邀请数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆