Facebook Graph API time limit - facebook

is there any way to use the Graph API access token for more than 60days? I'm thinking about creating platform that will let you automate your Facebook page and it will be a big problem if clients are forced to log into FB accounts and generate new tokens every 2 months.

Related

how to fetch Facebook Audience Network Reporting API Version 2 programmatically and automatically?

Facebook Audience Network Reporting API Version 2 only support Facebook Login to fetch token, see here https://developers.facebook.com/docs/audience-network/optimization/report-api/guide-v2#login
here I want to ask how to make this programmed (automatically)? I no need to open browser, login facebook manually to create token very three months? I think it is so inconvenient.

Request data from Facebook Graph API with multiple different tokens

I request data from my companies facebook page via the Facebook Graph API. I have created a page access token which has multiple rights. With this token I can read multiple statistical facts showing the performance of the facebook page.
According to the page access token description the token is connected to my user account. I am currently an admin of the facebook page of my company. Currently I share the page access token with my colleges.
Problems:
What happens if I am not the admin of the page anymore (e.g. I leave my current company).
What happens if I delete my facebook account some time in the future?
I would like to have multiple access tokens in order to use a backup token if neccessary
What would be the right way to do this?
I know there is sth. like an app access token (see link above).
I think there is only ONE unique app access token. Can I create multiple tokens?
Is there a proper way to handle my problem?
Is the page access token (which I currently use) coupled with my private facebook account? That would be bad!

Automate Facebook page access token generation

So I'm trying to obtain a list of posts from a Facebook page that I have created. After reading the documentation, I need to provide a user access token / page token to each API request in order to get the data. The documentation states that the user access tokens & page access tokens come in two variants:
Short life, expires within a few hours / days.
Long life, expires within 90 days.
The application I am building is a aggregated news (Facebook, twitter and Instagram) feed that will be displayed to users on my website.
From what I have read, the app tokens don't have an expiration but cannot access the pages API.
Do Facebook really expect application owners to remember to manually update their keys every 90 days in order to keep the applications working, or am I missing something that I can do to automate this?
If it is only about your Page, you are not missing anything, and there is no way to automate generating tokens - that would make expiration dates pointless. You can only send yourself a reminder before it expires. But: It can also expire if your change your Facebook Password, for example. It would be a good idea to implement a proper error handling so you get a message when the Token does not work anymore.
If it is about other Pages too, you can apply for Page Public Content Access and use an App Token that is valid forever.

How to get long-lived Facebook Access Token to see user groups?

Facebook removed access to user groups after v2.3. Now it only allows access to user-managed groups. I, however, need to access all user groups for my app to work. Do you know of any way around this and why Facebook would remove that? I can still generate an access token for v2.3 through the Graph API Explorer, but it only lasts a few minutes and it needs to be associated with an app for it to be extended (per instructions here: Generate "never-expire" access token for Facebook Page), but I can't create an app on Facebook with an older version of the API.

Retrieve a facebook secret group feed

I'm building a PHP application on a website to allow members of a secret Facebook group to retrieve all the YouTube links posted on the group wall. To do that I need to retrieve the feed of the group which I did using open graph. I generate an access_token thanks to graph API explorer and I managed to display the feed but it relies on the access_token which is eventually going to expire.
How can I do to be able to call the API's functions at any time with a valid access_token?
I was thinking about asking the visitors to connect with their Facebook account onto the application so that they can make a request with their own token.
Do you have leads on how I could do that?
Thanks i just created a dum app on facebook to allow oauth on my website and that did the trick.