I would like to ask about the combination of Playfab and Corona.
Their information is very small. I don't know how to use it.
Playfab has LoginWithFacebook, and Corona has plugin.facebook.v4a.
I want to know is that I can use only the API provided by playfab to do this alone?
Because I can log in normally using plugin.facebook.v4a, but I can't log in using the playfab API.
And LoginWithGoogleAccount is also unable to appear login results.
Which means that Playfab's API can not be used alone??
Answer by Jay Zuo · Dec 07, 2018 at 07:58 AM
I'm not familiar with Corona, but it should be similar with what in Getting Started with Facebook & Unity. This tutorial is for Unity and it used Facebook SDK for Unity. For Corona, you might use Facebook “v4a” plugin to login first. Then you can use facebook.getCurrentAccessToken() to get Facebook AccessToken. With this token, you can finally LoginWithFacebook. So you can't use only PlayFab's API to perform FB login.
LoginWithGoogleAccount is similar, here you will need to get a ServerAuthCode instead of the AccessToken used in Facebook. For more info, you can refer to PlayFab Sign-In With Google Play Games in Unity.
Thank you for your answer, I have generally understood.
I also want to ask a question.
After logging in with the v4a plugin and logging in with LoginWithFacebook, will it cause 2 logins?
For example: Will players be deducted repeatedly when they buy?
Will this be the case?
Thank you.
The first login is log into Facebook to get AccessToken so that you can use it in PlayFab's LoginWithFacebook, PlayFab need this token to get player's Facebook account info and link it into the player's PlayFab account. In PlayFab, there will only be one login. Players won't be deducted repeatedly when they buy.
Thank you for your answer, I have generally understood.
I also want to ask a question.
After logging in with the v4a plugin and logging in with LoginWithFacebook, will it cause 2 logins?
For example: Will players be deducted repeatedly when they buy?
Will this be the case?
Thank you.
The Corona v4a plugin logs the user into Facebook. You then get a token from Facebook, to log into PlayFab. So yes, two logins, because you're logging into two completely separate services - one login each. But the login to PlayFab would be invisible to the user, since you already have the Facebook token at that point.
Purchasing is completely unrelated to login, apart from the fact that you need a valid session ticket to make the purchase call.