[英]Unity3D Firebase Facebook Login
In firebase unity3d auth docs, there is a line(Follow instructions for Android and iOS to get an access token for the signed-in Facebook user.) 在firebase unity3d auth文档中,有一行(按照Android和iOS的说明为登录的Facebook用户获取访问令牌。)
But in android section of course there is java codes.But in unity, we are using C#
and I cannot reach access token
and there is no FacebookCallBack
and LoginResult
object in unity SDK. 但是在android部分中当然有Java代码。但是在unity中,我们使用C#
并且我无法access token
,并且unity SDK中没有FacebookCallBack
和LoginResult
对象。
How can I make Facebook login in Unity with Firebase? 如何使用Firebase在Unity中登录Facebook?
You should set-up Facebook SDK in you project. 您应该在项目中设置Facebook SDK 。 Follow the instructions to configure your Android/iOS app at the developer dashboard. 请按照说明在开发人员仪表板上配置您的Android / iOS应用。 And after successful log-in you'll receive callback with access token, eg 成功登录后,您将收到带有访问令牌的回调,例如
FB.LogInWithReadPermissions (
new List<string>(){"public_profile", "email", "user_friends"},
callback: (result) =>{
Debug.Log("Logged-in successful. Access token: " + result.AccessToken.TokenString)
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.