I am trying to get the number of likes a tweet I posted has to display in a pie chart alongside other things. Looking at the documentation I saw that the way to get a specific tweet is by doing
$resultado = $twitter->get('statuses/show/', $idpost);
and to retrieve the likes I read online that you can use
$result = $resultado->{"favorite_count"};
But when I print $result I get nothing at all.
I am probably doing something wrong but I can't find where I am failing, I also tried to print $resultado and same thing, I get nothing. I tried looking at other answers to similar questions online but nothing. Does anyone know a way to get the likes of a specific tweet? Just so you know I am using abraham's twitteroauth library for this. Someone willing to help? Thanks!
Edit: Just tried var_dump($resultado); and still, I am not getting anything from it.
Comments
Post a Comment