简体   繁体   中英

Log into twitter?

Ok, basically what I am trying to do is get a boolean if I have logged in or not. I am using the Twitter4j library and they gave me the following three things to look at.

http://twitter4j.org/en/code-examples.html

https://github.com/yusuke/sign-in-with-twitter/blob/master/src/main/java/twitter4j/examples/signin/SigninServlet.java

https://github.com/yusuke/sign-in-with-twitter/blob/master/src/main/java/twitter4j/examples/signin/CallbackServlet.java

I have no idea how to log in and get if I logged in successfully.

Thanks, and I have no code btw... all I did was basically copy code and try different things.

PS. On a separate note how do I learn how to use someone elses library?

Twitter uses OAuth. There is no concept of having logged in from any external app. There is instead a concept of an app being authorized to communicate with your account on twitter. On how to learn to use somebody else's library... that's a really general question... reading the documentation is a good start, then the IRC channel for the relevant language (or library if it has its own IRC channel).

I've found people on IRC channels to be very helpful when you have a specific code problem you are trying to solve and the real time help often enables faster progress than waiting for answers to a question on a forum or SO.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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