question

flavio-rausa avatar image
flavio-rausa asked

FB.Init() has already been called. You only need to call this once and only once.

Hi, in my game I have a log-in screen where there is the facebook login button, and than a Game Scene. When I log in, I go to the game scene and go back to the login screen I am no longer allowed to re-login given the following error:

FB.Init() has already been called. You only need to call this once and only once.

How can I fix this?

Then I have 2 more questions:

1)Is it possible to also collect the email associated with the facebook account and store it on Playfab like a normal account?

2)Is it possible to memorize the login for automatic login? T

Thanks.

Account Management
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

·
Sarah Zhang avatar image
Sarah Zhang answered

>> How can I fix this?

“FB.Init() has already been called. You only need to call this once and only once.”is from Facebook SDK, please search the corresponding keywords in the search engine or Facebook developer forum for more detailed information. Playfab supports calling the PlayFab login API repeatedly.

>> Is it possible to also collect the email associated with the facebook account and store it on Playfab like a normal account?

Playfab cannot collect the facebook accounts’ emails to store it as a PlayFab account. But Playfab supports signing the user in using Facebook access token via API Client/ LoginWithFacebook or linking Facebook account associated with the provided Facebook access token to the user's PlayFab account with API Client/LinkFacebookAccount. Players need to have a Playfab user account anyway. Then you can link the Facebook accounts to the PlayFab accounts or login the PlayFab accounts via Facebook access token.

>> Is it possible to memorize the login for automatic login?

Yes, it’s possible. PlayFab supports logging the user in using a custom unique identifier, Android or iOS device identifier, etc to implement no friction login mechanisms. Please check this section Anonymous login mechanisms and this documentation Account linking quickstart for the corresponding info of PlayFab Anonymous login. You can also find the corresponding API in the API references via searching the keywords.

10 |1200

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

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.