PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, February 10, 2022

[FIXED] Find all the pages for which a user is an admin using Facebook Graph API

 February 10, 2022     facebook, facebook-graph-api, facebook-php-sdk     No comments   

Issue

Until now, I was using FQL. I've seen that it's going to be removed (when, I don't know).

When I have obtained the rights to query the user profile, I can find out the pages she manages. Something like the following example. So from page_admin, I get the details of all the pages.

$fql = "select talking_about_count, access_token, description, emails,fan_count,general_info, location, page_url, pic_square, username, page_id,name from page WHERE page_id IN (SELECT page_id FROM page_admin where uid = ".$user['fbuid'].')';

$fql = 'https://graph.facebook.com/'.$user['fbuid'].'/fql?access_token='.$user['token'].'&q='.urlencode($fql);

I cannot find the equivalent using the graph API.


Solution

/me/accounts with the manage_pages permission is what you need



Answered By - andyrandy
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing