fasisi
fasisi

Reputation: 396

how to get my twitter timeline entries

I have tried this and that.

But requesting this:

https://api.twitter.com/1.1/statuses/user_timeline.json?user_id=monyetbego

keep giving me Bad Authentication data.

I don't know exactly how to get authenticated.

Upvotes: 0

Views: 84

Answers (1)

willwest
willwest

Reputation: 384

You need to register an application through Twitter's developer site. Once your application is approved you will be given a set of Oauth keys, which you can use within an API request to receive a response. Note that in API V1.1, you can no longer submit unauthenticated requests (i.e. send requests through a unauthenticated URL like the one you posted).

For example, once you have your authentication information, you can use curl to submit a show_timeline request (see your Application's OAuth tool on the Twitter Dev website for parameters specific to your authentication information):

curl --get 'https://api.twitter.com/1.1/user_timeline.json' --header 'Authorization: OAuth 
oauth_consumer_key="XXXXXXXXXXXXXXXX", oauth_nonce="XXXXXXXXXXXXXXXXXXXXXXXX", 
oauth_signature="XXXXXXXXXXXXXXXXXXXXXXXXXXX", oauth_signature_method="XXXX-XXXXX", 
oauth_timestamp="XXXXXXXXXXX", oauth_token="XXXXXXXX-
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", oauth_version="1.0"' --verbose

Upvotes: 1

Related Questions