简体   繁体   中英

Twitter API - get tweets with id_str

Sorry , I have a problem with this script : It's for get tweet with specific id ;

$tweetlist = $twitter->get('https://api.twitter.com/1.1/statuses/show.json?id=694658584664236033');

foreach ($tweetlist->statuses as $key => $value) {

    $message = utf8_decode($value->text);
    echo $message;
}

Warning: Invalid argument supplied for foreach()

Thank you so much for your help Nicolas

remove ->statuses , like:

$tweetlist = $twitter->get('https://api.twitter.com/1.1/statuses/show.json?id=694658584664236033');

foreach ($tweetlist as $key => $value) {

$message = utf8_decode($value->text);
echo $message;
}

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