Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook SDK 17.0.0 "Instant Games" Application Type cannot get token_for_business #2458

Open
5 tasks done
marionjson opened this issue Jul 18, 2024 · 0 comments
Open
5 tasks done

Comments

@marionjson
Copy link

marionjson commented Jul 18, 2024

Checklist before submitting a bug report

Xcode version

15.2

Facebook iOS SDK version

17.0.0

Dependency Manager

SPM

SDK Framework

Login

Goals

I hope that after upgrading the FB-SDK to 17.0.0, I can also get the user's token_for_business parameter

Expected results

{
   "token_for_business": "Ab.......IPXf",
   "id": "122414......036874"
}

Actual results

"error": {
"message": "(#100) Tried accessing nonexisting field (token_for_business) on node type (GamesServiceUser)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "xxxx"
}

Steps to reproduce

  1. Obtain the AuthenticationToken through the FB SDK
  2. Then, parse the UserId from the JWT
  3. Finally, use this Api to retrieve the token_for_business parameter
https://graph.facebook.com/v19.0/{UserId}?access_token={access_token}&fields=token_for_business
  1. However, the request returns the following exception:
"error": {
"message": "(#100) Tried accessing nonexisting field (token_for_business) on node type (GamesServiceUser)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "xxxx"
}

The reason for the exception is that my Facebook app type is Instant Games, which means I cannot obtain the token_for_business parameter.

Code samples & details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant