Facebook API Page Token - facebook

Our web development firm is requesting a page access token. Currently, the only page access token we can generate provides full admin access and we do not want to share any advertising spend, post insights or analytics information with the web development firm. The objective of the API key / page access token is to pull content from our Facebook business page and display it on our new site, only.
Is it possible to create a page access token / API key with limited permissions? and what are the steps required? I was unable to find any specific documentation on the topic.
Thanks in advance.

Each Token can include different permissions. The most basic Page Token only includes the manage_pages permission, in addition you can add publish_pages which allows to post to a Page with the Token, or read_insights to get access to Page insights. A list of possible permissions can be found in the docs: https://developers.facebook.com/docs/facebook-login/permissions/
In your case, a Page Token with only the manage_pages permission will be good enough.

Related

How to find the rating of facebook Page using C#

As per facebook API documentation we can get Facebook Page ratings using "/{page_id}/ratings". For this we need page access token.
https://developers.facebook.com/docs/graph-api/reference/v2.0/page/ratings
How can I get Page Access Token from facebook application.
Please help me.
Thanks,
You can use the
/me/accounts
endpoint as described here:https://developers.facebook.com/docs/graph-api/reference/v2.0/user/accounts/
Be sure to grant the manage_pages permission. Try it
https://developers.facebook.com/tools/explorer/?method=GET&path=me%2Faccounts&version=v2.0
Furthermore, I'd recommend to exchange the short-lived token from the last step to a long-lived one (60 days) as described here: https://developers.facebook.com/docs/facebook-login/access-tokens/#extending

Facebook Page Access Token can be used to post stuff?

I have read some introduction about Facebook's access token on http://www.devils-heaven.com/facebook-access-tokens/
What I want to ask is that can the page access token of Facebook be used as a permanent token if I just want to post something on the wall like user access token?
First of all don't ever follow the third-party documentation for the facebook integration. They have the official documentation pls follow that. For access tokens read here.
What I want to ask is that can the page access token of Facebook be used as a permanent token if I just want to post something on the wall like user access token?
Its actually a vague question. It depends on what kind of posting you want to do. For eg:
If you want to post on a user's wall- there's nothing that a page access token can do
If you want to post a user's group/event etc. wall, again page access token has nothing to do with it.
If you want to post on a page, then yes you have to use the page access token in order to post on behalf of page itself.
Page access tokens are used in Graph API calls to manage Facebook Pages. To generate a page access token, an admin of the page must grant an extended permission called manage_pages. Once this permission has been granted, you can retrieve the page access token using the following Graph API request:
GET /{user-id}/accounts
You can also extend a page access token that will never expire. See here how to do that!

Facebook page: Permission update

I had an unknown permission exception when I tried to update/create/delete or doing anything my Page properties by using FB.api . I tried again by using Graph API Explore but it still gave me same error. I used google for 2 days but there wasn't any correct answer.
Below screenshot is my app Settings in the Adminster Page's account:
http://demos.kksolution.com/Facebook/screenshot/post-update-about-page.jpg
And here is the Graph API Expore screenshots:
demos.kksolution.com/Facebook/screenshot/list-pages.jpg
Next is the error:
demos.kksolution.com/Facebook/screenshot/post-update-about-page.jpg
Please help me. Thanks too much.
You need a page access token.
Page Access Token – These access tokens are similar to user access
tokens, except that they provide permission to APIs that read, write
or modify the data belonging to a Facebook Page. To obtain a page
access token you need to start by obtaining a user access token and
asking for the manage_pages permission. Once you have the user access
token you then get the page access token via the Graph API.
Doc: https://developers.facebook.com/docs/facebook-login/access-tokens/
Then use GET /me/accounts to get the access token associated to your page.

Facebook scenario 5 on the Removal of offline_access permission page

I have a general Facebook development question. I'm trying to understand how scenario 5 on Facebooks Removal of offline_access page is supposed to work and what that token can be used for.
A little bit about my app. I allow my apps users to schedule/post Facebook posts from a third party system I integrate with. We then pull the likes and comments and feed it back into that system. Right now we are set up to get the 60 day long lived token and that works great but we have to impose a time limit on scheduling. It's not the end of the world but if we can do better we want to explore that option.
Thus we were told about "Scenario 5" which I've posted and linked to below. My questions are:
What does it mean by a page that the user administers?
What are the pros/cons of this method?
Similar to #2 what can this method do or not do that the 60 day access token can't/can do?
Any tips or hurdles to watch out for when implementing this?
Scenario 5: Page Access Tokens
When a user grants an app the manage_pages permission, the app is able to obtain page access tokens for pages that the user administers by querying the [User ID]/accounts Graph API endpoint. With the migration enabled, when using a short-lived user access token to query this endpoint, the page access tokens obtained are short-lived as well.
Exchange the short-lived user access token for a long-lived access token using the endpoint and steps explained earlier. By using a long-lived user access token, querying the [User ID]/accounts endpoint will now provide page access tokens that do not expire for pages that a user manages. This will also apply when querying with a non-expiring user access token obtained through the deprecated offline_access permission.
http://developers.facebook.com/roadmap/offline-access-removal/
This is referring to the Page access tokens which are used by your app to administer a Facebook Page on behalf of an admin of that page.
These tokens can only access the page itself, or publicly accessible content, you can't use a page access token as a replacement for a user access token.

Facebook: Get access token to post as a page

Is it possible to somehow get an access token to use the facebook api like a user that clicked "use facebook as "?
What I'm trying to do is to allow my website to post messages to the facebook page's wall. I already have an app which I use to allow my users to login with their FB account. However, I'd prefer not to require a page admin to authorize full manage_pages to my app. I already added the app to my FB page, but there are no options to give that app some permissions for my page.
Of course it's possible.
In the official documentation page about Permissions it's written:
Page access_token
An access_token used to manage a page. This is used
when you want to perform an operation acting as a Page. This access
token is retrieved by issuing an HTTP GET to /USER_ID/accounts or to
/PAGE_ID?fields=access_token with the manage_pages permission. Getting
/USER_ID/accounts will return a list of Pages (including app profile
pages) to which the user has administrative access in addition to an
access_token for each Page. Alternatively, you can get a page access
token for a single, specific, page by issuing an HTTP GET to
/PAGE_ID?fields=access_token with the manage_pages permission (you
must ask for the access_token field specifically via the fields=
parameter). See the documentation for the Page object for more
information. NOTE: After November 1, 2011, manage_pages permission
will be required for all access to a user's pages via this connection,
i.e. for both reading the user's pages and also retrieving
access_tokens for those pages. See the documentation for the User
object for more information.