简体   繁体   English

通过Facebook登录名注册用户(未指定用户名/密码)

[英]Register a user via Facebook login (no username/password specified)

The Parse documentation provides instructions on associating a Facebook account with a registered ParseUser. 解析文档提供了有关将Facebook帐户与注册的ParseUser关联的说明。

To register a ParseUser, the user needs to pick a username, password and provide an email. 要注册ParseUser,用户需要选择用户名,密码并提供电子邮件。

I am creating a mobile game where I will be using Parse to store data about game sessions and I will be using Facebook to allow users to "Challenge" their Facebook friends to initiate these challenges. 我正在创建一个手机游戏,我将使用Parse来存储有关游戏会话的数据,并且将使用Facebook允许用户“挑战”他们的Facebook朋友来发起这些挑战。

For this reason, I would like to let my users "register" by logging in to my game with their Facebook account. 因此,我想让我的用户通过使用其Facebook帐户登录我的游戏来“注册”。 I do not need them to pick a username and password. 我不需要他们选择用户名和密码。

How can I achieve this? 我该如何实现?

You can create a Parse user after you logged in via Facebook and there will be no need to provide any username, password or email. 通过Facebook登录后,您可以创建一个Parse用户,而无需提供任何用户名,密码或电子邮件。 Use the Facebook Unity SDK to log in your user first as shown here: https://developers.facebook.com/docs/unity/examples#login 使用Facebook Unity SDK首先登录您的用户,如下所示: https : //developers.facebook.com/docs/unity/examples#login

Then create a Parse user associated with that Facebook user using the Parse ParseFacebookUtils by calling LogInAsync() method: 然后通过调用LogInAsync()方法,使用Parse ParseFacebookUtils创建与该Facebook用户关联的Parse用户:

Task<ParseUser> logInTask = ParseFacebookUtils.LogInAsync(userId, accessToken, tokenExpiration);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过用户名和密码注册用户并通过会员身份确认密码和电子邮件? - How to register user by username and password and confirm password and email by membership? 使用Dynamics GP用户名和密码的SqlConnection-用户登录失败 - SqlConnection using Dynamics GP username and password — Login failed for user Facebook登录WinForms用户名 - Facebook Login WinForms Username 通过Azure Functions对Azure AD中的用户进行身份验证(验证用户名和密码) - Authenticate User In Azure AD (validate username & password) via Azure Functions 用户“用户名”的登录失败 - Login failed for user 'username' 用户名与自定义和Facebook登录相同 - Same username with custom and facebook login 使用指定的用户名和密码运行mstsc.exe - Run mstsc.exe with specified username and password 未指定用户名/密码致电Amazon S3 - Username / password not specified Calling Amazon S3 在连接字符串中未指定用户名的情况下,获取“用户Microsoft \\ my@email.com的登录失败” - Getting a “Login failed for user Microsoft\my@email.com” without having specified username in connection string 使用用户名和密码将用户连接到数据库 - Connecting user to database with username and password
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM