skip to Main Content

I’m using facebook JS SDK version 2.11. For Login I’ve added following code

  FB.login(function(response) {
    // Handling Code here
  }, { scope: "user_posts" });

But Login Dialog doesn’t have permission for user_posts. I also checked using me/permissions and user_posts is not there.

enter image description here

How can I get access_token to get user_posts on FB.Login. App is still in developer mode and facebook review team is also facing the same issue.

Please Help!

2

Answers


  1. I think you need to let Facebook review your app.
    From the docs:

    Which permissions require review?

    • Review is not required to ask for the three basic permissions: public_profile, user_friends and email.
    • Review is required to ask for any other permissions when people log into your app
    Login or Signup to reply.
  2. You can try to get user feed at facebook graph api explorer – this is the best testing environment.

    Then try

    GET https://graph.facebook.com/v2.12/me/feed?access_token=<ACCESS_TOKEN>

    this is request u are in need of use.

    Also try

    FB.login(function(response) {
        // handle the response
    
        console.log(response.grantedScopes); // should work as well
    }, {
        scope: 'publish_actions,email,user_likes,user_posts', 
        return_scopes: true
    });
    

    By setting the return_scopes option to true in the option object when calling FB.login(), you will receive a list of the granted permissions in the grantedScopes field on the authResponse object.

    This will definitely help you with debugging your app. If @BigJ is right, you won’t do much without app reviewed. Hope my answer is helpful.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search