简体   繁体   English

在Android中登录Twitter

[英]Log in twitter in android

I use the library "twitter4j" to interface with Twitter API. 我使用库“ twitter4j”与Twitter API进行接口。 I need to write log in code but i don't understand very well how i can do it. 我需要编写登录代码,但我不太了解如何做到这一点。 I must write an application where user can specify username and password and i must take this value(username and password) and log in Twitter. 我必须编写一个应用程序,用户可以在其中指定用户名和密码,并且必须使用此值(用户名和密码)并登录Twitter。 I find a lot of kind documentation but I don't understand how I must use it. 我找到了很多类似的文档,但是我不明白如何使用它。 In details I don't understand why I must create an application with twitter account like this: 详细来说,我不明白为什么我必须使用以下Twitter帐户创建应用程序:

http://xmeng.wordpress.com/2011/07/10/how-to-handle-sign-in-with-twitter-using-twitter4j/ http://xmeng.wordpress.com/2011/07/10/how-to-handle-sign-in-with-twitter-using-twitter4j/

I need to log in with username and password but the example on the web log in with CONSUMER KEY and CONSUMER SEGRET KEY can someone help me with some documentation? 我需要使用用户名和密码登录,但是使用CONSUMER KEY和CONSUMER SEGRET KEY登录网络上的示例可以有人帮助我提供一些文档吗?

I need to log in with username and password but the example on the web log in with CONSUMER KEY and CONSUMER SEGRET KEY 我需要使用用户名和密码登录,但是在Web上的示例使用CONSUMER KEY和CONSUMER SEGRET KEY登录

The Twitter API uses OAuth authentication . Twitter API使用OAuth身份验证 This means you don't directly use the username/password, but instead use OAuth tokens returned to you after the user logs into Twitter. 这意味着您不直接使用用户名/密码,而是使用用户登录Twitter后返回给您的OAuth令牌。 There is no documentation to show you how to just use the username/password because that's not how the Twitter API is intended to be used. 没有文档可以向您展示如何仅使用用户名/密码,因为这不是旨在使用Twitter API的方式。

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

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