0

I want to retrieve the page_id of user owned pages using graph api and fql search .I used $facebook->api('/me/accounts') (Graph API) but its showing an error

 error :[message] => An active access token must be used to query information about the     
 current user.
  [type] => OAuthException
  [code] => 2500 . 

I have also user fql query but its not working .I have a doubt like what and where should i use access tokes and where should i specify managed permissions .

  • Possible duplicate : http://stackoverflow.com/questions/2966015/facebook-get-list-of-pages-that-a-user-is-admin-of . – Shubham A. Jun 22 '16 at 04:38

1 Answers1

0

First you need to obtain basic permissions to access the user data. There is a ton of info on that including the official documentation. Once you have basic permissions your api call

$facebook->api('/me/accounts');

should be working

Alexander Nenkov
  • 2,910
  • 20
  • 28
  • sir I have browsed alot and could not perfect solutions ...where should i get or define the permissions ..I have defined in the login part is that correct ?$loginUrl = $facebook->getLoginUrl( array( 'scope' => 'manage_pages'redirect_uri' => $fbconfig['baseurl'] ) ); – user2010600 Jan 25 '13 at 11:58
  • Not sure if you copy/pasted the above but it has wrong syntax. $loginUrl = $facebook->getLoginUrl( array( 'scope' => 'manage_pages', redirect_uri' => $fbconfig['baseurl'] ) ); You don't need manage_pages to access the data. – Alexander Nenkov Jan 25 '13 at 12:04