0

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.

HungryHeart
  • 71
  • 1
  • 7

1 Answers1

0

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!)

Cormac Driver
  • 2,511
  • 1
  • 12
  • 10
  • i am using twitter4j so i will have to change my whole code about twitter re-tweet, tweet and reply. can i get only request url for timeline with oauth. and would it work for twitter api 1.1 ? – HungryHeart Jul 24 '13 at 05:13
  • I recommend that you check out Twitter's OAuth tool in their documentation for the Home Timeline API endpoint. It helps you generate an OAuth token and gives you the URL format you need to make an authenticated call to Home Timeline. https://dev.twitter.com/docs/api/1.1/get/statuses/home_timeline#oauth-tool – Cormac Driver Jul 24 '13 at 13:13
  • thanks Cormac, i did it with twitter4j itself and you also gave me the same request url. So thank you very much for your kind help. – HungryHeart Jul 25 '13 at 07:26