简体   繁体   中英

how to get user timeline in new Twitter API 1.1 in android

i have link of twitter timeline of my client but it only worked in twitter API 1 but it dose not work in twitter API 1.1. i read documentation of API 1.1 and found that i have to make authentication(means i understand oauth_token) in every request. i am using twitter4j and in callback URL i got oauth token and verifier and made a request using it but it does not work yet. please help me i have spent a lot of time on it.

link i previously used ishttps://api.twitter.com/1/statuses/user_timeline.rss?screen_name=TwitterName

links that i have tried are:-

https://api.twitter.com/1.1/statuses/user_timeline.rss?screen_name=TwitterName

https://api.twitter.com/1.1/statuses/user_timeline.rss?oauth_token=5lZ5xwBUnAoJEOn5wUxTKFCn0sBMUxvehLb116SfaE&screen_name=TwitterName

please tell me how to get user timeline in rss or json and how to get and use oauth_token.

Temboo makes it simple to get OAuth tokens for the Twitter API by breaking the process up into two basic steps.

  1. InitializeOAuth returns an authorization URL you can send users to so that they can grant access to their Twitter timelines.
  2. FinalizeOAuth returns the access tokens you need.

You can read about how to generate Twitter access tokens via Temboo at the link below:

https://www.temboo.com/library/Library/Twitter/OAuth/

Once you've got your access tokens you can retrieve the user's timeline here:

https://www.temboo.com/library/Library/Twitter/Timelines/UserTimeline/

Temboo has SDKs for seven languages, including Android, and you can automatically generate the source code you need to retrieve both the access tokens and the user's timeline via Temboo's website.

(Full disclosure: I work for Temboo, so let me know if you have any questions!)

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