开发者

how to get manage_pages permission automatically

开发者 https://www.devze.com 2023-04-05 18:58 出处:网络
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.

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


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消