Facebook:获取用户管理的页面列表 [英] Facebook: get list of pages that a user is admin of

查看:105
本文介绍了Facebook:获取用户管理的页面列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用图形API。

I'm using the graph api.

我有一个登录用户,并希望得到用户所有页面的页面ID列表是一个管理员。

I have a logged in user, and want to get back a list of page ids of all the pages that the user is an admin of.

有没有办法呢?文档很糟糕,而且是循环的。

Is there a way of doing this? The docs are pretty bad - and circular.

推荐答案

它使用Graph API简单。步骤:

Its simple with Graph API. Steps:


  1. 获取用户(扩展权限)的 manage_pages 权限。 / li>
  2. 调用Graph API - https://graph.facebook.com/我/帐户

  1. Get the manage_pages permission from the user (extended permissions).
  2. Call the Graph API - https://graph.facebook.com/me/accounts

您可以测试此过程在图形浏览器 - >只需点击获取访问令牌按钮 - >下'扩展许可'检查'manage_pages'&提交它将为您提供管理页面细节JSON。

You can test this procedure in the graph explorer -> Just click on 'Get Access Token' button-> under 'Extended permission' check 'manage_pages' & submit it. It will give you the admin-page-details JSON.

这篇关于Facebook:获取用户管理的页面列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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