简体   繁体   中英

Get tweets of a user using API

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.

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.

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