简体   繁体   English

Android-> Facebook登录没有对话框?

[英]Android -> Facebook login without a dialog?

I've been following a tutorial from Using Facebook SDK in Android development, Part 1 and Using Facebook SDK in Android development, Part 2 to create a Facebook login. 我一直在遵循在Android开发中使用Facebook SDK(第1部分)在Android开发中使用Facebook SDK(第2部分)中的教程来创建Facebook登录。 But there, once I press the login-button, a standard login-dialog pops out... Yet, I want it to login with already set credentials, without that dialog, such as a login function that takes in "email" and "password" and returns, say, the user's screen name. 但是,一旦我按下登录按钮,就会弹出一个标准的登录对话框...但是,我希望它能够使用已经设置的凭据登录,而不需要该对话框,例如带有“电子邮件”和“电子邮件”的登录功能密码”,并返回例如用户的屏幕名称。

What do you think would be the best way to do that? 您认为哪种方法最好呢?

I searched the web long and hard and everywhere it says that you can't get rid of the standard login dialog, BUT if we look at the Messenger application, Belgium, man!, it does have a custom login screen! 我在网上搜索得很长很难,而且说它无法摆脱标准的登录对话框,但是如果我们看一下Messenger应用程序,比利时,男人!它确实有一个自定义登录界面! How did they do that? 他们是怎么做到的? :) :)

在此输入图像描述

It is better for you to follow the official Facebook's instructions because Facebook changes the API all the time, so even if some post on the Internet had really good tutorials or guides... they get "deprecated" really fast. 你最好按照官方Facebook的说明,因为Facebook一直在改变API,所以即使互联网上的一些帖子有很好的教程或指南......他们也很快被“弃用”了。

The updated information is always here: 更新的信息始终在此处:

You can get a working example at Facebook SDK for Android (GitHub). 你可以在Facebook SDK for Android (GitHub) 找到一个有效的例子。

I've followed those instructions, and I achieved signup and you do not need to login again (you'll need to re-login only if the token you obtained at signup is not valid anymore or your user deliberately unlinked your application from Facebook). 我已按照这些说明进行操作,并且已完成注册,您无需再次登录(仅当您在注册时获得的令牌不再有效或您的用户有意将您的应用程序与Facebook取消链接时,才需要重新登录) 。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM