question

sullivanbousiniere avatar image
sullivanbousiniere asked

Obtain long lived token from the backend

Hi,

I need to get a long-lived token from Facebook. In their docs, they say that it should be requested from a backend. I do not have one yet and plan on adding PlayFab.

Is this something that can be done with your product.

Here is the code provided by FB for the request :

curl -i -X GET "https://graph.facebook.com/{graph-api-version}/oauth/access_token?  
    grant_type=fb_exchange_token&          
    client_id={app-id}&
    client_secret={app-secret}&
    fb_exchange_token={your-access-token}" 
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

According to the Facebook Docs, you need a server to request the long-lived token from Facebook based on security concern. You can use our PlayFab CloudScript using Azure Functions - PlayFab | Microsoft Learn to implement the function by yourself.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.