Skip to content

AccessToken.refreshCurrentAccessTokenAsync() fails for Gaming Graph tokens (graphDomain = "gaming") #1376

@jheun66

Description

@jheun66

Checklist before submitting a bug report

Java version

11

Android version

API 35

Android SDK version

35

Installation platform & version

18.0.3

Package

Login

Goals

Refresh Gaming Graph access token using AccessToken.refreshCurrentAccessTokenAsync().

Expected results

Token should be refreshed successfully with updated expiration time and permissions.

Actual results

Fails with error:

{
  "errorCode": 100,
  "subErrorCode": 33,
  "errorType": "FacebookApiException",
  "errorMessage": "Unsupported get request. Object with ID 'graph' does not exist, cannot be loaded due to missing permissions, or does not support this operation"
}

Steps to reproduce

Login with Gaming permissions (gaming_profile)
Obtain a Gaming Graph access token (graphDomain = "gaming")
Call AccessToken.refreshCurrentAccessTokenAsync()

Code samples & details

AccessToken.refreshCurrentAccessTokenAsync(object : AccessToken.AccessTokenRefreshCallback {
    override fun OnTokenRefreshed(accessToken: AccessToken?) {
        Log.d("Test", "Success: $accessToken")
    }
    override fun OnTokenRefreshFailed(exception: FacebookException?) {
        Log.e("Test", "Failed: ${exception?.message}")
    }
})

Gaming Graph API (graph.fb.gg) does not support batch requests
Single GraphRequestSuccess
GraphRequestBatch with 1 requestSuccess
GraphRequestBatch with 2 requestsFails

AccessTokenManager.refreshCurrentAccessTokenImpl() sends 2 requests as batch, which fails for Gaming tokens.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions