简体   繁体   English

随时获取访问者的非公开Facebook信息

[英]Get non-public facebookinformation from visitors at any time

This might be an easy question, but I'd like your help with this. 这可能是一个简单的问题,但我希望您对此有所帮助。 I couldn't find a solution on stackoverflow neither with google, probably cause I don't know what to search. 我既没有找到与Google无关的stackoverflow解决方案,也可能是因为我不知道要搜索什么。


I'm using the facebook API for some purposes. 我出于某些目的使用了Facebook API。 Users who are visiting the page, need to login with facebook and give standard access to there profile. 访问该页面的用户需要登录Facebook并授予对该个人资料的标准访问权限。 The only thing I store at the moment is there facebookid. 我目前唯一存储的是facebookid。

The issue: On this page I need the amount of friends (just the countnumber) from the last users who visited the page. 问题:在此页面上,我需要最近访问该页面的用户的朋友数量(仅是计数)。 (for some purposes) To bad the friends are not publicly accessible. (出于某些目的)不好的是,不能公开访问朋友。

What's the best solution to retrieve this? 检索此内容的最佳解决方案是什么?

  1. Storing the access token (is this still possible in a way?) and get friends with graph.facebook.com/ -id- /friends?access_token=... 存储访问令牌(是否仍然有可能?)并通过graph.facebook.com/ -id- / friends?access_token = ... 结识朋友。
  2. Is there another way to get count of friends? 还有另一种获取朋友计数的方法吗?

I'd rather not save the amount of friends in the db, cause this is not accurate. 我宁愿不要在db中保存大量的朋友,因为这不准确。

Thanks in advance! 提前致谢!

You need to collect offline_access extended permission. 您需要收集offline_access扩展权限。 And then to access other friend data, please cllect the friend_* extended permissions listed in the following SO url 然后要访问其他朋友数据,请选择下面的SO URL中列出的friend_ *扩展权限

Facebook Graph API - get friends info Facebook Graph API-获取朋友信息

Hope it will help. 希望它会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM