How to get most recent Tweets posted by multiple users using CURL commands

rest
api

#1

Hi All,

I’m completely new to the Twitter Rest API. I have generated a curl command using OAuth tool in twitter to get the tweets posted by a single user.

curl --get ‘https://api.twitter.com/1.1/statuses/user_timeline.json’ --data ‘count=2&screen_name=twitterapi’ --header ‘Authorization: OAuth oauth_consumer_key=“AAAAAAAAAAAAAAAAAAAA”, oauth_nonce=“BBBBBBBBBBBBBBBBBBBBBBB”, oauth_signature=“CCCCCCCCCCCCCCCCCCCCCCCCCCC”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1471672391”, oauth_token=“DDDDDDDDDDDDDDDDDDDDDDDDDDDDDD”, oauth_version=“1.0”’

I got the data for a single screen_name and now I would like to pull the tweets for multiple screen_names at once through Curl.
I have tried this using POST but it didn’t work. I have been trying this since 7 days.

Can anyone help me to resolve this ?

Thanks in Advance.
Aswin


#2

curl commands and Twitter OAuth are much more difficult to work with than some library in Python or Java or any other language - i’d suggest you try one of those https://dev.twitter.com/overview/api/twitter-libraries

Getting timelines for multiple users will involve multiple calls to statuses/user_timeline.json, changing the screen_name parameter for each user - how you implement that depends on what library and language you end up using. The library should take care of all the OAuth and request stuff.