我如何在Facebook上获取一个页面的管理员用户ID? [英] How can i get the admins user id of a page in facebook.?
问题描述
对于例如:这将给出页面KFC的详细信息
https://graph.facebook.com/126380033352
{
id: 126380033352,
name:I Love KFC,
picture:http://profile.ak.fbcdn.net/hprofile-ak-snc4/50510_126380033352_4943708_s.jpg,
link:http://www.facebook.com/Official.KFC,
喜欢:543485,
category:食物/饮料,
username:官方KFC,
创立:1929,
about:KFC英国手指Lickin'好,
can_post :true,
talking_about_count:8965,
type:page
}
我需要获取页面的用户ID admin ..?我已经检查了权限,但我不知道如何得到。
首先:用户必须是该页面的管理员。
使用manage_pages权限,请求 GET https://graph.facebook.com/ [PAGE_ID]?fields = access_token
作为回应将获得一个页面管理员的access_token。
现在使用页面admin access_token来请求 GET https://graph.facebook.com/ [PAGE_ID] / admins
作为回应,您将获得管理员列表,其身份和用户名。
参考:
http://developers.facebook.com/docs/reference/api/page/
How can i get the admins user id of a page in facebook using grapg API .?
For eg: This will give the details of page KFC
https://graph.facebook.com/126380033352
{
"id": "126380033352",
"name": "I Love KFC",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/50510_126380033352_4943708_s.jpg",
"link": "http://www.facebook.com/Official.KFC",
"likes": 543485,
"category": "Food/beverages",
"username": "Official.KFC",
"founded": "1929",
"about": "KFC United Kingdom. Finger Lickin' Good.",
"can_post": true,
"talking_about_count": 8965,
"type": "page"
}
I need to get the user id of the page admin..? I have checked the permissions but i dont know how to get that .?
First: User must be a admin of that page.
With "manage_pages" permission, request GET https://graph.facebook.com/[PAGE_ID]?fields=access_token
In response will get a Page admin access_token.
Now use the page admin access_token to request GET https://graph.facebook.com/[PAGE_ID]/admins
In response you will get the list of admins, their id and usernames.
Reference: http://developers.facebook.com/docs/reference/api/page/
这篇关于我如何在Facebook上获取一个页面的管理员用户ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!