7

I want to use User Profile API from Facebook to get customer user data (first name, last name, picture). My app is reviewed, my app is connected to fanpage, i have pages_messaging and other permissions active. Webhooks are working correct, i receive messages from user and i can respond to them, yet when i use PSID from webhook and use it on this endpointhttps://graph.facebook.com/v9.0/{PSID} i get this error:

"error": {
"message": "Unsupported get request. Object with ID 'XXXXX' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33}

Am I missing some permissions? Bad app/page configuration? I've been trying to find something in documentation but right now i'm defeated by it.

ArturPie
  • 81
  • 1
  • 1
  • 4
  • What kind of access token did you use for the request? – CBroe Dec 09 '20 at 09:49
  • Page Access Token – ArturPie Dec 09 '20 at 10:39
  • Did you perform this part as well? https://developers.facebook.com/docs/messenger-platform/identity/user-profile#requesting-feature-access-to-user-fields-for-the-page – CBroe Dec 09 '20 at 10:45
  • I didn't pull requests for these 3 options, aren't they additional? I just need first name, last name and profile_pic and if i understand correctly, i should have access to these fields. – ArturPie Dec 09 '20 at 11:30
  • Are you sure the ID is actually correct? Make sure your system treats them as string values everywhere, otherwise you can easily run into problems with “mangled” ids due to integer overflow issues. – CBroe Dec 09 '20 at 11:39
  • I have this problem even if i'm trying to get data in graph api explorer. I doubt it's a type problem. I am doing everything according to documentation :( – ArturPie Dec 09 '20 at 11:42
  • What does that prove? If you got the ID _from_ your webhook endpoint, and it got mangled there already - then copy&pasting that already mangled ID into GAE now doesn’t prove or disprove anything. – CBroe Dec 09 '20 at 11:44
  • But when I use this endpoint to get data from my PSID (I'm an admin) i get my data, so I this can't be this mangled ID problem. – ArturPie Dec 09 '20 at 12:18

5 Answers5

1

I solved the problem with getting additional permission Business Asset User Profile Access (api 8.0+).

ArturPie
  • 81
  • 1
  • 1
  • 4
  • Hello! I ran into exactly the same problem you described. Which `permissions` exactly do you use? Could you please list them? [Business Asset User Profile Access](https://developers.facebook.com/docs/apps/features-reference/) part of the documentation does not list permissions. – Nurzhan Nogerbek Mar 04 '21 at 04:23
1

I had the same issue, one probable reason is that you need to pass the account ID with 'act_' at the beginning of it so it becomes 'act_XXXXX'.

AliSh
  • 77
  • 4
0

I was having the same issue, the main reason is that you need to pass the account ID starting with

'act_'

at the beginning of it so it becomes

'act_XXXXX'

This resolved my issue. Hope so resolves everyone's who is coming to find solution for it.

Abdul Rehman
  • 142
  • 1
  • 12
0

Looks like you cannot make this request on behalf of Test User. If it is your case, try to make a call from Tester's Role user account instead.

For real life application you need Business Asset User Profile Access

vadzim dvorak
  • 939
  • 6
  • 24
-1

There can be multiple reasons to it, you need to check the status of your account by visiting the Alerts Page on this url: https://developers.facebook.com/apps/<APP_ID>/alerts/inbox/?business_id=<BUSINESS_ID>

This alert page would show you the issue/permissions denied, for example: enter image description here

Haziq
  • 2,048
  • 1
  • 16
  • 27