Auth0 Home Blog Docs

Unauthorized Facebook Graph API request

access-token
facebook

#1

Hi
So the user authenticates with my site through Auth0.> Facebook.
I then try to publish to their FB feed but get
message:"(#200) The user hasn’t authorized the application to perform this action"
type : “OAuthException”

My process is to get the Auth0 access token from the management API:
https://auth0.com/docs/tutorials/calling-an-external-idp-api

I extract the IDP access token, having previously set the required publish_actions user permissions:
https://auth0.com/docs/tutorials/adding-scopes-for-an-external-idp
https://developers.facebook.com/docs/graph-api/reference/v2.9/user/feed#publish

But still get the aforementioned error. what am I missing here? Is it because the Auth0 access token from the management API was requested and cached previous to me setting the permissions perhaps?

Thanks for any help…


#2

If the user hasn’t logged in since you updated the permissions, the access_token in the user profile won’t have the new permissions. Can you try logging in with the user and check the new access_token.


#3

thanks for the response.
Logged in with the test user again with a new Auth0 access token from the management API and a new Facebook access token and still getting the same error.


#4