如何获取正在使用您的Facebook应用程序的用户的所有用户ID [英] How to get all the user IDs of people who are using your Facebook application

查看:312
本文介绍了如何获取正在使用您的Facebook应用程序的用户的所有用户ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案

有一种方法可以获取所有使用Facebook应用程序的用户的用户ID广泛的研究我得出结论, 没有办法这样做



我发现:

一个旧的REST API,名为 friends.getAppUsers 获取用户朋友的所有ID授权申请。



我希望我发现:

阅读 App Login 验证文件中的c $ c>部分:


除了用户登录,Facebook
平台支持应用程序登录使用
OAuth 2.0客户端凭据流。
App登录允许您为您的应用程序
采取各种
管理操作,例如检索Insights数据或
批准请求。


我以为 application 对象将有一个直接的方法(类似于帐户):

  $ facebook-> api(/ APP_ID / users); 

但我错了。然后,随着见解功能的引入,我很震惊,你只能获取用户ID的计数



您可以做什么:

一旦用户授权您的应用程序,将用户ID存储在数据库中,如果您的应用程序已经有用户(很可能是这种情况),请检查每个用户是否在您的数据库中与应用程序进行交互的记录...这样,您将无时间地获得活跃用户的用户ID 。


Is there a way to get the user IDs of all the people who are using your Facebook application?

解决方案

Doing an extensive research I concluded that there's NO method to do this!

What I have found:
An old REST API called friends.getAppUsers that gets all the IDs of the user's friends that authorized the application.

What I wish I had found:
After reading the App Login section in the authentication document:

In addition to User Login, Facebook Platform support App Login using the OAuth 2.0 Client Credential flow. App Login allows you to take various administrative actions for your app, such as retrieving Insights data or approving Requests.

I thought the application object would have a direct method for this (similar to accounts):

$facebook->api("/APP_ID/users");

But I was wrong. And then with the introduction of the insights feature, I was shocked that you can only get the count of the User IDs!

What you can do:
Storing the User ID in your DB as soon as a user authorize your application and if your application already has users (most likely the case), check if you have a record for each user that interacts with your application in your DB...this way, you'll get the User IDs for your active users in no time.

这篇关于如何获取正在使用您的Facebook应用程序的用户的所有用户ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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