json 检索 Facebook 粉丝姓名
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2001281/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Retrieve Facebook Fan Names
提问by saibot
I'm trying to grab the names of fans of a Facebook fan page that I administer. I've done some snooping around, and apparently, the FB API doesn't support that, but Facebook actually uses AJAX/JSON to populate the list. Anyways, can anyone suggest a way to make that call myself and grab the data as plain text?
我正在尝试获取我管理的 Facebook 粉丝页面的粉丝姓名。我已经做了一些窥探,显然,FB API 不支持,但 Facebook 实际上使用 AJAX/JSON 来填充列表。无论如何,任何人都可以建议一种方法来自己打电话并以纯文本形式获取数据吗?
Also, I've found a hack that a guy wrote in Ruby, but I am completely unfamiliar with the language.
另外,我发现了一个人用 Ruby 编写的 hack,但我完全不熟悉该语言。
Thanks for the help in advance!
我在这里先向您的帮助表示感谢!
回答by Richard
At the current time the FQL schema would suggest that there is no way to get a collection of FANS for any given PAGE. I think they are hiding this information because they display the FANS on the page... One would think that at least the ADMIN would have privileges to see the list of users.
目前,FQL 模式表明无法获取任何给定 PAGE 的 FANS 集合。我认为他们隐藏了这些信息,因为他们在页面上显示了 FANS...人们会认为至少 ADMIN 将有权查看用户列表。
Anyway... I hope someone make is possible in the near future.
无论如何......我希望有人在不久的将来成为可能。
回答by P.V
can you please try this and let me know :
你能试试这个吗,让我知道:
select uid,name from user where uid in ( select uid from page_fan where uid in (select uid2 from friend where uid1 = me()) and page_id = 'Your Page Id')
I think you can get it only for the currently logged in user and his / her friends only.
我认为您只能为当前登录的用户和他/她的朋友获得它。
回答by Vjeux
If you have less than 500 fans, you can use the following url:
如果您的粉丝少于 500,您可以使用以下网址:
http://www.facebook.com/browse/?type=page_fans&page_id=13207908137&start=400
http://www.facebook.com/browse/?type=page_fans&page_id=13207908137&start=400
Each page will give you 100 fans. Change &start to (0, 100, 200, 300, 400) to get the first 500. If &start is >= 401, the page will be blank :(
每个页面都会给你 100 个粉丝。将 &start 更改为 (0, 100, 200, 300, 400) 以获取前 500 个。如果 &start >= 401,则页面将为空白 :(
回答by Takács Zsolt
I found that in the doc: http://developers.facebook.com/docs/reference/fql/page_fan/
我在文档中发现:http: //developers.facebook.com/docs/reference/fql/page_fan/
uid - "The user ID who has liked the Page being queried."
uid - “点赞被查询页面的用户 ID。”
回答by ScottE
SELECT first_name, last_name FROM user WHERE uid IN (SELECT uid FROM page_fan WHERE page_id = [your page id])
This should work, but I get an error trying to run this through the .net facebook api...something about the where clause not being on an indexable column, which it is.
这应该可以工作,但是我在尝试通过 .net facebook api 运行它时出现错误......关于 where 子句不在可索引列上的事情,它是。
Perhaps give that a try on your platform.
也许在您的平台上尝试一下。
回答by nganassan
That one worked
那个有效
SELECT user_id FROM like WHERE object_id="YOUR PAGE ID"

