Search code examples
facebook-javascript-sdkfacebook-access-token

Facebook js api - "unsupported get request" error


I'm trying to get some (I think allowed) information in my app. I have an access token that has the following info:

App ID: <my app id> : iHOUSEListingPoster - Test 001
Type:   User
App-Scoped User ID:   <user id> : Joe Webb
Valid:  True
Scopes: email, pages_show_list, pages_read_engagement, pages_manage_posts, public_profile

I'm trying this:

FB.api( "/me",
        "GET",
        {fields: 'name'},
        function(get_fb_info_response) {
         console.log("Here: ", get_fb_info_response
      });

And getting this error: "Unsupported get request. Object with ID 'me' does not exist, cannot be loaded due to missing permissions, or does not support this operation"

I have tried with both "/me" and "/me/". And while I want name, picture and email, I tried limiting it to just name, and still. What am I missing here?


Solution

  • Ok, I finally figured out what the problem is/was here (sheepish face). We have a couple of Facebook accounts here at the company. One is the container for my app and it's test app, the other is a more general company account. I was logged into the general company account. When I tried my app, it grabbed some random app from that account, which wasn't the app that matched the access token (which I think is possible wrong on Facebook's part), therefore this error was thrown.

    Once I logged into the correct Facebook account, all works as expected.