You are most welcome and fingers crossed this token keeps working now
I found another way to get long-lived tokens. it is perhaps the simplest of all I have seen. are they good for you too?
I still have a question. I am trying to get a long-lived user access token and then a short-lived token to the fb page. If I understand correctly, this is what you are doing, have I understood correctly?
I managed to create a long-lived user token, but I have a problem with obtaining a short-term token for the fb website.
Which problem exactly are you seeing? Perhaps you can share the output from the Get Pages node of the example workflow above (you can of course redact the tokens themselves, I just want to see the data structure you are working with)?
Sorry, false alarm. This piece of code gives a different result depending on what token is put in the code.
https://graph.facebook.com/me/accounts?access_token=REPLACE_THIS_WITH_YOUR_TEMPORARY_TOKEN
For example, for a long-lived user token, we will get a short-lived token page that works for 3 months
But that’s not a problem. Simply fetch a fresh page token at the beginning of your workflow as shown in the example above. That way you’ll have a valid page token whenever your workflow runs.
Could it be possible to do automation that would update the saved short-term tokens? Short-term tokens last 3 months, so you do not need to generate new ones during this time. automation would be activated every three months to update existing tokens. is it possible ?
Sure, if you store the token somewhere and then read it again when needed and create a separate workflow taking care of the update.
It’s just way more work compared to simply have your workflow fetch a fresh page token whenever it runs like in the example provided.