question

zhengho avatar image
zhengho asked

Playfab's FB login in the Corona SDK??

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??

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

·
JayZuo avatar image
JayZuo answered

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.

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.

zhengho avatar image zhengho commented ·

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.

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ zhengho commented ·

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.

1 Like 1 ·
zhengho avatar image zhengho commented ·

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.

0 Likes 0 ·
brendan avatar image brendan zhengho commented ·

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.

0 Likes 0 ·

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.