System User not getting manage_pages permission from page access token - facebook

I made a system user and he has permissions of manage_pages.
Then from his access token I made a call to this URL
me/accounts
Then the pages were listed below with their access tokens.
Then those access tokens didn't have manage_pages permission.
Problem:
I need manage_pages permission on those page access tokens.

Related

Update Facebook token for additional permissions

My application authenticates users via Facebook. It requests user token for permissions public_profile and user_photos.
One day I found that all registered users have only public_profile, and application have no access to their photos, because I did not get approve from Facebook for user_photos permission.
After all I got this approve, and tokens of new users logged in via Facebook have user_photos permission.
But legacy users have no, their tokens did not updated automatically to obtain additional user_photos permission.
Is there a way to refresh a Facebook token, without logout and login again?
You can´t just refresh a Token without user interaction, that would make the whole point of permission authorization pointless. You can just check for the granted permissions and call FB.login (if using the JS SDK) again if some permission is missing: https://developers.facebook.com/docs/graph-api/reference/user/permissions/
This may be interesting for you too: https://developers.facebook.com/docs/facebook-login/handling-declined-permissions/

Facebook API Error: "User does not have sufficient administrative permission for this action on this page."

I'm using a Facebook app (in development mode) to generate a page access token so that my personal web app can schedule/edit/delete posts on a Facebook fan page.
I'm using the Graph Explorer to generate the token while logged in as the admin of the fan page.
When I use that token, I'm able to GET a list of the scheduled posts, but whenever I try to edit or delete a post, I get this error:
"User does not have sufficient administrative permission for this action on this page."
Here is the debug of the token:
Any ideas on how to fix this?
Here according to the documentation
DELETING YOUR POST
These are the permissions you need in the scope of your token.
To delete a user's post, a user access token with publish_actions permission is required.
To delete a Page's post a Page access token and publish_pages permission is required.
To delete a User's post on Page a Page access token is required.
To delete another User's post on a Page-owned event the user_managed_groups permission is required.
UPDATING YOUR POST
A user access token with publish_actions permission.
SO you need publish_actions permission within the scope of your token.
Update 1
Also check here if you have the valid page role

Facebook Page Access Token with read_page_mailboxes permission

I need to send private replies to page comments from my website. I am admin of the page and app.
Facebook's graph's api doc states following: "A Page access token with the read_page_mailboxes permission is required to create a message" but does not say, how to get the token with such permission.
I have tried tokens from "me/accounts", "/{page_id}?fields=access_token" and even generated 60 day access token from graph api explorer, but I get "OAuthException" with message "Requires read_page_mailboxes permission to manage the object". Any ideas?
To get a permanent Page Access Token with the additional permission 'read_page_mailboxes' you have to:
Generate a User Access Token with the permission 'read_page_mailboxes' for your app (use the Graph API Explorer) -> this generates a 24h User Access Token
Extend this User Access Token to "expires never" (using the Access Token Debugger)
Get a permanent Page Access Token with this User Access Token (using the Graph API Explorer on your Page Id)
See also:
facebook: permanent Page Access Token?
Note: You don't need to request this permission through developers.facebook.com/apps - "App Review" - "Submission" - "Add Items"
You need to ask the user for that permission during login, of course – like with any other permission.
It is the user (page admin), that grants this permission. Only after that is done, the page access token will “include” that permission.

Get page access token by app access token

I could not get my user page access token. I have enabled manage_pages in permission of my application settings.
When i access the Graph API I got blank data, no access token.
/page_id?fields=access_token
I am having the understanding that we can get user page access token by configuring manage_page permissions.
https://developers.facebook.com/docs/reference/api/page/#page_access_tokens

Facebook App Token to Page Token without logged-in user

Having an application token, a user who authorized the application with manage_pages permission, how can I access to the pages this particular user is admin of?
You can't, you need a user access token for that permission as outlined in the docs
https://developers.facebook.com/docs/reference/api/user/ (look for accounts)
You don t need an application token but a user access token to access those pages