alexroan / twitter-scraper
Scrapes tweets from a user's profile
dev-master
2018-06-01 17:12 UTC
Requires
This package is not auto-updated.
Last update: 2025-03-30 08:10:02 UTC
README
Grab tweets from a user's public profile without api credentials
Installation
Composer
composer require alexroan/twitter-scraper
Usage
//get feed $feed = Twitter_Scraper::get_feed('alexroan'); //loop through posts foreach($feed as $tweet){ //tweet id $id = $tweet->id; //username of tweeter $username = $tweet->username; //bool whether retweet or not $is_retweet = $tweet->is_retweet; //body text of tweet $text = $tweet->text; //time tweeted $time = $tweet->time; //any media in tweet $media = $tweet->media; //number of replies $reply = $tweet->reply; //number of retweets $retweet = $tweet->retweet; //number of favourites $favourite = $tweet->favourite; }