Facebook Pages loose permissions when adding a new Page - facebook

I am an admin of multiple Facebook pages. I also have a Facebook app that has amongst others manage_pages permission for these pages (it is used as part of an chat integration that reads messages from these pages). I encountered an unexpected behaviour when creating a new page. When adding permissions to this new page, all my existing pages seem to have lost their permissions.
When checking my active business integrations, i can see all my pages and can see that the permissions, such as manage_pages are unticked.
Also when obtaining the page access token for one of the pages, i get the following error message The 'manage_pages' permission must be granted before impersonating a user's page.
I looked at existing Stackoverflow answers, but they deal with permissions of new pages not being inherited rather than permissions of existing pages being lost
I'd expect that adding a new page does not have any effect on my other pages. Did anybody else run into the same problem? Is this a known Facebook bug?

Related

Facebook's Messaging Feature Review API giving permission error for page editors

I have a Facebook page listed in Facebook NPI. I am an editor of that page. When I am trying to check the subscription/news messaging permission status programmatically using this api:
https://developers.facebook.com/docs/messenger-platform/reference/messaging-feature-review-api/?hc_location=ufi
I am getting the following permission error:
(#200) User does not have sufficient administrative permission for this action on this page. If the page business requires Two Factor Authentication, the user also needs to enable Two Factor Authentication.
But when Facebook page owner calls this API, it returns the status successfully.
Can anyone tell me why page editor is getting the permission error?
Guess that is simply considered a page management action you do not have access to using that “role”.
Roles have been replaced by Tasks by now, see https://developers.facebook.com/docs/pages/overview-1#tasks
The only difference in the tasks they can perform, between old Admin and Editor roles, was MANAGE - so I guess you will need to have a page admin approve your user account for that task on the page now first, if you want to be able to use this particular API.

Is there a way to rerequest permissions to a newly created page without deleting the `manage_pages` permission?

I am working on a web application that requests access to the pages managed by a user. It was working perfectly until I found an use case which apparently needs requesting manage_pages permission again.
Imagine the user gives permission to an application to access all of their pages (e.g. "Page 1" and "Page 2"). Now let's suppose they created another page ("Page 3"). What happens is: the application only have access to the first two pages and /me/accounts only returns "Page 1" and "Page 2". When I use the parameter auth_type=rerequest in another request, it does not prompt the permission dialogue since the manage_pages was already given (I reckon).
Is there a way to ask the user to give permission to their pages again without having to revoke permissions? The problem with revoking is that the application would have to delete users previously authorized manage_page on every login, since we would not know when a new page was created.
edit: including image of the page selector dialogue

Facebook messenger app webhook subscription - Insufficient Permission

I have facebook messenger application (it is bot using MS Bot Framework, although I don't think it is relevant). It has webhook subscribed to page events. It used to work fine until few days ago, when the webhook was unsubscribed from page and when I am trying to subscribe again it tells me:
"Insufficient Permission You do not have the necessary permission for
the specified Page to perform the requested action."
I am owner and admin on both the FB page and messenger app. I created similar page and messenger app and it works there, but I still need to use this old one. I tried subscribing to other pages which I own and admin, but with same result. I also tried it with other person who is admin.
I found other people experiencing same/similar message on FB, but not in this particular case. But I haven't found any solution.
Does anyone know what could be the problem? Or have anyone experienced this issue?
Thanks in advance for any ideas.
You need to generate a token first. Under messager->Settings->Token Generation-> Select your page and you'll be prompted to give the permission. Grant all permission required, then you shall be able to subscribe or unsubscribe to pages you manage.
This process gives your application the token to validate if you have the moderator or higher rights to the page you want to subscribe to.
After spending 3 days on this. Here is the solution for this.
Go to your Facebook Profile - > Settings -> Apps
and Remove YOUR APP from there.
In Developer Dashboard Go to App Review -> Add Items
manage_pages
(This Permission Needed for Accessing page access tokens)
Add above permission for review - with any simple video of above error
Now go to Messanger-> Settings -> Token Generation
Select page from dropdown List
now it will open a popup (because you removed this app in 1st step) for app access permission , notice that now it will ask for manage pages permission
Grant those permission and create access tokens
Now try again subscribing Webhook to Pages
This Works for me.
You need to generate your page access token for this.
Go to your facebook Developer dashboard, and open the messenger tab. There, you will see this for token generation. Select your page and generate the token. Then use this token in your bot.
Page access token generation

Facebook Page Application - determine if user is admin

Thank you very much for visiting this topic. Currently I'm working on a smaller application that can be installed on facebook pages (not accounts, but separately created pages, like company or fan pages on facebook). I managed to fire up the php SDK for it, even made successful user authentications and played around with access tokens (only user access tokens though).
However my problems arose when I've tried to determine if the current user is an administrator for that facebook page (where the application is installed).
I've done numerous google searches and research into this topic, but sadly I've realised that most tutorials, questions or related topics are all outdated, or they have obsolete solutions.
I kept running into the 'manage-pages' permission when people advised me to go for page access tokens. However in my opinion asking facebook to grant me manage-pages permission, then prompting users to allow me access to everything on their pages during authentication seems a bit far fetched.
I do not want to modify or read their page contents in any way. I simply want a mini admin page for the application that can be opened by only users that are admins of that certain page.
I've seen an edit url that can be added in the settings of the application. However I could not find out what it does, or how can I access it if I add an url there. The related documentation on facebook seems to be out of date.
I would be very grateful if someone can point me in the right direction with this. Basically I'm looking for a method, that does not require me to use the 'manage_pages' permission, but I can still check out if the current user viewing the installed application on the page is an admin or not. (I wonder if facebook supports an other method for this)
Thank you very much for any kind of tips or aid in this matter!
Facebook never gives of fan pages or other pages access.
You have to communicate with facebook page admin and its give a token.
Suppose if you have a permission than it generated token will be you use in your application
how do you do?
1 communicate with admin.
2 Admin generat token from https://developers.facebook.com/tools/explorer
3 go to tools and support than it generated token you use in your application.
Note: "Page of admin can it do to generate token"

Permissions for posting links to an open graph page via an administrating app

I have several (hundreds) of pages that exist as nodes in the open graph. All of these pages are administered by a single app. I have no problem whatsoever posting to these pages' feeds (https://graph.facebook.com/PAGE_ID/feed) but when I attempt to post to the links feed:
(https://graph.facebook.com/PAGE_ID/links) I receive the following error:
{"error":{"message":"(#282) Requires extended permission:
share_item","type":"OAuthException"}}
Since these pages are administered by my application, and are not users themselves, I do not know how to acquire extended permissions to share on the pages' behalf (also, from the documentation I believe I actually would want the "publish_stream" and/or "manage_pages" permissions, I do not see "share_item" listed).
So, my question then, is since pages cannot grant permissions to applications explicitly (not being alive), how do I perform actions that seem to require extended permissions on those pages via the administering application?
Or, put another way, how do I force a page to give me permissions to post shareable links to its wall?
Thanks in advance.
A day of bashing on the Graph API led me to the solution.
Counterintuitively, I needed to grant MY OWN APPLICATION extended permissions to manage the pages, despite the fact that the application (not the user) is technically the administrator of these pages. I'm guessing this has something to do with however Facebook maintains the relationship between the user who administers an app, and that apps' administration over the pages.
Regardless, while logged into Facebook as my application's administrator, I followed Facebook's authentication guidelines and granted myself "offline_access", "publish_stream", and "manage_pages" permissions to my own application. Not all of those may have been necessary, but I wanted to be sure.
I could then post to my pages' link streams as follows:
curl -F 'access_token=ACCESS_TOKEN' \
-F 'link=LINK' \
-F 'name=TITLE' \
-F 'description=DESCRIPTION' \
https://graph.facebook.com/PAGE_ID/links
The new access token seems to grant sufficient permissions that no error is thrown and my links are properly formatted.