facebook / facebook-sdk-for-unity

The facebook sdk for unity.
https://developers.facebook.com/docs/unity
Other
480 stars 256 forks source link

ERROR: Failed to start login flow,InnerErrorCode: 190,InnerErrorMessage: Error validating application. Invalid application ID.,InnerErrorSubcode: 0,InnerErrorTraceId: #730

Open GameKit28 opened 3 weeks ago

GameKit28 commented 3 weeks ago

Checklist

Environment

I'm using the Unity Editor on Windows using the WindowsExample.unity scene. The same error occurs within a Windows build and when I call FB.LogInWithReadPermissions directly. I've added the App's App Name, Facebook App ID, and Client Token to the Facebook Settings scriptable object in SDK\Resources\. I've also tried with a new empty Unity project with only the Facebook SDK installed.

Goals

Greetings! I'm trying to use the Facebook SDK for Unity to authenticate a Facebook user with my client's established Facebook App for retrieval of user's name, profile picture, and email (for support purposes).

Expected Results

I expect the call to FB.LogInWithReadPermissions to return successfully, with a valid access token that I can then pass to Unity Gaming Services authentication or use to retrieve the user's info through GraphQL requests.

Actual Results

The callback returns with the ILoginResult result error value as ERROR: Failed to start login flow,InnerErrorCode: 190,InnerErrorMessage: Error validating application. Invalid application ID.,InnerErrorSubcode: 0,InnerErrorTraceId:. (along with an InnerErrorTraceId).

image

Steps to Reproduce

  1. Create an empty Unity project and switch to the Windows, Mac, Linux platform.
  2. Download and import the Facebook SDK for Unity package. facebook-unity-sdk-17.0.1.unitypackage
  3. Select Facebook > Edit Settings from the file menu.
  4. Supply the App Name, Facebook App Id, and Client Token to the settings.
  5. Open the WindowsExample.unity scene.
  6. Run the Scene.
  7. Select the Init tab, then click the Initialize Facebook Unity SDK button.
  8. Select the Login tab.
  9. (optionally) Supply a list of permissions other than the default 'gaming_profile`.
  10. Click the Login with READ permissions button.

Code Samples & Details

I suspect the issues lies with my configuration of the Facebook App on the Facebook Developer page, but all the settings appear correct to my knowledge.

image image image (The pages_user_timezone was just for testing purposes) image (I'm planning on addressing the iOS and Android SDK versions later)

Of particular note, this Facebook App was last updated in 2014 and the game was last released in 2014. My work for this client includes updating the game for re-release.

A few other things I've tried:

As I write this up, I'm noticing the Verification required notice next to the public_profile and email permissions, along with the message below. When I make the call with public_profile, email or the default gaming_profile, I receive the same error. When I call it with only pages_user_timezone requested, I receive this error Error: Requested value 'PagesUserTimezone' was not found. but I suspect this is a red herring. image

Thank you in advance for any and all help you can provide!

GameKit28 commented 3 weeks ago

This may also be relevant, the App type is listed as None. image

I thought I recalled reading somewhere that only certain App types are supported by the SDK, but now I'm unable to find that reference.

GameKit28 commented 1 week ago

I've also tested the manual login flow described on this page: https://developers.facebook.com/docs/facebook-login/guides/advanced/manual-flow I used the following HTTP request and a valid token was returned in the URI. https://facebook.com/v20.0/dialog/oauth?client_id=REDACTED&redirect_uri=https%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html&state=28&response_type=token

I was successfully able to use the token to make a GraphQL request for my first_name. Debugging the token through this tool gave me the information below, which all looks accurate: https://developers.facebook.com/tools/debug/accesstoken/ image

The Facebook SDK for Unity continues to give me this error: ERROR: Failed to start login flow,InnerErrorCode: 190,InnerErrorMessage: Error validating application. Invalid application ID.,InnerErrorSubcode: 0,InnerErrorTraceId: