我尝试使用Twitter的API访问来自多个用户的推文。这是我的代码,其中X,Y,Z是3个不同的Twitter用户,打开页面。我的代码:
$url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';
$getfield = "?q=from:X+OR+from:Y+OR+Z+count=100";
$requestMethod = 'GET';
$twitter = new TwitterAPIExchange($settings);
$response = $twitter->setGetfield($getfield)
->buildOauth($url, $requestMethod)
->performRequest();
$response = json_decode($response);
print_r($response);