I am attempting to use the Graph API Explorer to create an access token for my application to view my pages using 'me/accounts'. However, every time I try this, it returns me an empty data set. I have chosen manage_pages as a permission and it still doesn't work. Without checking any other permissions, I am able to view 'me/likes', 'me/movies', etc.. I have no idea what I am doing wrong.
This is what I'm doing:
https://developers.facebook.com/tools/explorer/
- Select my application from the drop-down menu.
- Click "Get Access Token" >> Check "manage_pages" >> Get Access Token
- Submit "GET /me/accounts"
I get :
{
"data": [
]
}
I have been through a dozen different google searches for an answer to my problem and have tried everything, including creating user tokens and app tokens. Any help would be much appreciated. Thanks!
UPDATE 6/27/13 I found a couple of resources that say to include publish_stream as a permission as well, which I tried. Still no success tho. Also, somebody had suggested that it might be a restrictions problem, but my app has no restrictions(except the default 13+).
I also had same problem while fetching my photos of an album. solved this by adding a permission named "user_status" in my access token.
I was unaware that the ability to view my 'pages' from /me/account required that I have an additional 'page admin' access permission. Once the app owner granted me it within the app, I was able to see the data in the Graph Explorer.
Also note there is a new User permission,
read_insights
, which needs to be enabled, otherwise reading any/insights
edge will fail silently with empty response.I had a similar issue. Several solutions on stackoverflow mostly attributed the issue to the lack of required permissions. Check the permissions you need by using the Graph API explorer or documentation (The tables have a column called permissions for each field). Some suggestions have been to use the scope to specifically mention which permissions you need in the login button or while making the call to the api. Eg:
I had a different issue where I had double-checked all the permissions set for my app dashboard that were correct, but while logging in, I had specified a scope with a set of permissions which seemed to override the app settings. :( I found this strange, but I rectified it by including the other permissions in the scope too and my problem was resolved.
An effective way to see if the right permissions are being set through the code is to use the following code:
P.S: On one post I also found a solution which mentioned that the person was able to get the data after deleting the app from his Facebook account and testing by adding it again. Also make sure that if you changed the permissions in the app dashboard, you log out of your application and login again before testing.
I wasted over 3 hours trying to fix this issue and facebook documentation did not help me a bit, so hope this helps someone!
I had a similar issue. I was also a 'Manager' for a page (from the page admin page on facebook: Edit page > Manage admin roles). Having that is not enough - one should also make sure the access token that is being used has a 'manage_pages' extended permission.
Also refer to the Facebook documentation (specifically section 2).