# Unauthorized Facebook Graph API request

**URL:** <https://community.auth0.com/t/unauthorized-facebook-graph-api-request/7495>\
**Category:** Get Help\
**Tags:** facebook, access-token\
**Created:** [July 13, 2017, 5:27am UTC](https://community.auth0.com/t/unauthorized-facebook-graph-api-request/7495 "2017-07-13T05:27:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![damiannorman](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@damiannorman](https://community.auth0.com/u/damiannorman)\
**Post date:** [July 13, 2017, 5:27am UTC](https://community.auth0.com/t/unauthorized-facebook-graph-api-request/7495/1 "2017-07-13T05:27:25Z")

</div>

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:

> **[Call an Identity Provider API - Auth0 Docs](https://auth0.com/docs/authenticate/identity-providers/calling-an-external-idp-api)**
>
> Call a social or enterprise identity provider's API from your Auth0 application using the upstream access token Auth0 stored after the user log in.

I extract the IDP access token, having previously set the required publish\_actions user permissions:

> **[Add Scopes/Permissions to Call Identity Provider APIs - Auth0 Docs](https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp)**
>
> Add additional OAuth scopes to an Auth0 connection for a configured social or enterprise identity provider to return profile fields and API permissions.

> **[Graph API Reference v25.0: User Feed - Documentation - Meta for Developers](https://developers.facebook.com/docs/graph-api/reference/v2.9/user/feed#publish)**
>
> Graph API Reference v25.0: User Feed

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…

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [July 13, 2017, 6:57am UTC](https://community.auth0.com/t/unauthorized-facebook-graph-api-request/7495/2 "2017-07-13T06:57:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![damiannorman](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@damiannorman](https://community.auth0.com/u/damiannorman)\
**Post date:** [July 19, 2017, 5:49am UTC](https://community.auth0.com/t/unauthorized-facebook-graph-api-request/7495/3 "2017-07-19T05:49:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:55am UTC](https://community.auth0.com/t/unauthorized-facebook-graph-api-request/7495/4 "2018-03-02T05:55:20Z")

</div>


