如何自动获得manage_pages权限
我的公司有大约一百个 Facebook 应用程序和 200 多个 Facebook 页面。
我的工作是通过 FQL 洞察获取有关应用程序、页面和域的所有统计信息。
经过多次尝试后,我的代码似乎不起作用,因为我的应用程序需要获得所有 Facebook 页面管理员的“manage_pages”权限,因为我的应用程序需要模拟它们。
即使我可以直接联系我的管理员,他们也需要逐一授权我的每一页的所有应用程序。
所以我想我必须编写一个 php 页面,能够自动获得管理员对其负责的所有页面的授权。
请考虑一下,我可以获得所有页面 id 和应用程序 id 的列表。
有谁请建议我如何以简单的方式自动让应用程序获得manage_pages权限? 不知道有没有PHP的例子?
谢谢您的宝贵时间
my company have about a hundred of facebook app and more than 200 facebook pages.
My job is to get via FQL insights all statistics about applications, pages, and domains.
After many tries it seems my code don't work because my app need to have "manage_pages" permission from all facebook pages administrators, because my apps need to impersonate them.
Even if I can contact directly my administrator they need to authorize all my applications for every page one by one.
So I think I have to write a php page able to automatically get authorization from administrators for all pages under their responsibility.
Please consider, I'm able to have a list of all pages id and app id.
Does anyone please suggest me how automatically let applications to get manage_pages permissions in a straightforward way?
Do you know if there are PHP examples?
Thank you for your time
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过登录屏幕自动卷曲来完成此操作。当您获取授权令牌时,用户需要通过登录屏幕输入凭据。如果你有用户名/密码,我想你可以通过它。在您获取权限的同时,请确保也获得离线访问权限,以便您收到一个持久令牌,可以在帐户未登录时使用。祝您好运。
编辑:上次我这样做时,我记录了整个身份验证过程,如果您想要一份副本,请私信我,我会通过电子邮件将其发送给您。他们正在逐步获取授权令牌来写入粉丝页面。
You could do it by automating curling through the login screen. When you go after an authorization token the user is required to enter credentials via a login screen. If you have user/pass words you can curl through it I suppose. While your getting permissions make sure to get the offline access permission too, so that you receive a persistent token that can be used when the account is not logged in. Good luck.
Edit: The last time I did this, I kept notes on the whole authentication process if you want a copy PM me and I'll email them to you. They are step-by-step getting authorization tokens to write to a fan page.
使用 JS SDK 使管理员登录到您的应用程序,并具有offline_access 和 read_insights 权限。
read_insights 权限将允许您访问每个页面和应用程序的见解。
Offline_access 将为您提供一个永久的 access_token,您可以使用它来更新见解,而无需等待页面和应用程序的管理员再次登录。
将见解存储在数据库中,这样您就可以将见解保留在内存中,而不必一直查询 API(这很耗时)
这基本上就是 Social-Insights 正在做的事情(http://insights.social-insights.net/ )而且效果非常好。
Use the JS SDK to login the admins into your app, with the offline_access and read_insights permission.
The read_insights permission will allow you to access the insights for each page and application.
The offline_access will give you a permanent access_token that you can use to update the insights without having to wait for the admins of the pages and apps to log-in again.
Store the insights in a database, so you can keep the insights in memory without having to query the APIs all the time (it's time consumming)
It's basically what Social-Insights is doing (http://insights.social-insights.net/) and it's workign pretty good.