Facebook GUI API - Full Server Authentication and APIs

I have an application that runs on a server. There is a background task on this server that will publish a status update on several social networks (Facebook, Twitter, G +). It must be fully server-side.

In the Twitter API, I can use the OAuth header to authorize the API request. The OAuth HTTP Header uses the consumer key, consumer secret, access token, and token access key to create the header. With this, I can send / update / delete tweets without user interaction.

How can I do this for facebook? I found a solution for getting long-term access_flow (2 months), but we don’t want to regenerate access_token every 60 days. We want to use it to manage our Facebook page - updating the publication status, but completely server-side.

Can I do this for Facebook? Thanks for answers. PS: I searched stackoverflow a hundred times, but without solving my problem.

Thanks.

+5
source share
2 answers

It is not possible for user access tokens (they can be extended up to 60 days and after that you need to update them after that), but to publish on the page you must use the page marker. The extended page token is valid forever.

Here are some links to help you get an extended page token:

The talk page will post β€œas Page,” but that is probably what you want. And auto-posting in user profiles is actually not allowed, each message must be 100% created by the user, and each publication must be authorized by the user.

+5
source

Pay attention to the expired and token tokens . Page access current may be a good solution only for server-side calls for testing and data analysis.

* All GET calls, and this procedure does not use the APP access token.

0
source

Source: https://habr.com/ru/post/1204082/


All Articles