Trouble with statuses/home_timeline SOLVED


Hello i have a problem with the home/timeline
I print the tweets of my timeline with the hour with succes :
echo $key->text.'<br>'.$key->created_at;
but i dont know how to add the user name of the man who habe tweeted this
I have tried $key->user-name but its doesnt work
If you have the solutions, please tell me


If you look at the structure of a user object, user-name is not a listed value. However screen_name is so I would recommend trying that.


Hello Abraham, first, thanks for your awesome library,

I tried this too but i still have the same error :


text and created_at are typically on a status object and screen_name is typically on a user object. If you get a status it will usually contain a user object and if you get a user it will usually contain a status object. You will have to figure out the hierarchy you are working with and the correct naming for it. E.g. I just used the GET statues/show endpoint and then used $status->user->screen_name.


Thanks a lot, you was very helpfull to me :slight_smile: