Answer the question
In order to leave comments, you need to log in
Why is the number of likes not coming to twitter api?
I make a GET request through the address bar of the browser and in 100% of cases I get the correct fav count for the tweet:
Request link (parameters input compartment):
https://api.twitter.com/1.1/statuses/lookup.json
$twitter = new TwitterAPIExchange($this->settings);//тут на входе массив с данными приложения и токенами
$url = "https://api.twitter.com/1.1/statuses/lookup.json";
$getfield = '?trim_user=true&include_entities=false&id=' . $value;//В value собственно ID твита
$response = @json_decode($twitter->setGetfield($getfield)->buildOauth($url, $this->requestMethod)->performRequest());//Отправляем запрос на api
$response = $response[0];
if(isset($response->favorite_count)){
$data["likes"] = $response->favorite_count;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question