2

I have the details for user XXXX1

 $oauth_access_token = "XXXXX";
   $oauth_access_token_secret = "XXXXX";
    $consumer_key = "XXXXX";
    $consumer_secret = "XXXXX";

I am getting the tweets of XXXXX1 by using curl with $url = "https://api.twitter.com/1.1/statuses/user_timeline.json";, but I want to get the tweets of other users like XXXXX2,XXXXX3,....

which API I need to use, suggest me pls.

1 Answers1

1

Referring to twitter API page you can specify additional parameters to GET query, and there is user_id or screen_name parameters that you need.

So basically you need to run this type of request for each user:

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

where 12345 is twitter user id.

h.s.o.b.s
  • 1,299
  • 9
  • 18
  • it's showing the error message `{"errors":[{"message":"Could not authenticate you","code":32}]}` –  May 14 '14 at 13:29
  • Before you can query the twitter API you should authenticate within it, that's why you need all those secrets and passwords. Twitter uses oAuth as API authentication service. Please show me more code, specifically how you connect and send auth details to twitter. – h.s.o.b.s May 15 '14 at 11:09