question

Charles avatar image
Charles asked

[Facebook-Playfab Tutorial] Failing at PlayFabClientAPI.LoginWithFacebook,[Facebook Login Tutorial] Playfab Authentication Failing?

Following this tutorial: https://api.playfab.com/docs/tutorials/landing-players/facebook-unity

Authenticates with Facebook just fine, but the PlayfabClientAPI.LoginWithFacebook part returns: /Client/LoginWithFacebook PlayFabError(InvalidAPIEndpoint, InvalidAPIEndpoint, 400 BadRequest)

I can use PlayFabClientAPI.LoginWithCustomID with no problems.

Do I need to take any extra steps?

,

Following this guide here: https://api.playfab.com/docs/tutorials/landing-players/facebook-unity

No alterations to the provided example script except for additional debug messages.

It authenticates with facebook just fine, but fails at PlayFabClientAPI.LoginWithFacebook, and it returns /Client/LoginWithFacebook PlayFabError(InvalidAPIEndpoint, InvalidAPIEndpoint, 400 BadRequest)

I can login to playfab using PlayFabClientAPI.LoginWithCustomID by itself with no problems.


Do I need to do any extra steps?

Authentication
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Andy avatar image
Andy answered

Can you share the full request you're making, including the uri? I suspect you've got something wrong in the request.

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Charles avatar image Charles commented ·

Not sure what the full request looks like; I'm using the PlayFabClientAPI.LoginWithFacebook method and passing the access token, with create account set to true.


0 Likes 0 ·
Andy avatar image Andy ♦♦ Charles commented ·

You'll need a tool like fiddler to capture a trace of the request and response. It's incredibly useful for debugging any web api. You could also try sharing your code, as without any more info all I can say is that we have thousands of successful calls to that API every hour and it's not a current issue with the service.

0 Likes 0 ·
Charles avatar image Charles Andy ♦♦ commented ·

Now that you brought up the request data, I took another look at the LoginWithFacebook documentation, and noticed that the example doesn't pass the Title ID.

Made a custom LoginWithFacebookRequest that specifically defined the AccessToken, TitleID, and the CreatAccount Bool. Passed this instead, and got it running.

Thanks much for the sanity check. I think this question's sorted now.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.