dotzecker / tuiter
Twitter archive manager
v0.1
2015-01-21 11:43 UTC
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ~5.1
- guzzlehttp/oauth-subscriber: 0.2.*
- league/csv: ~6.2
Requires (Dev)
- phpunit/php-code-coverage: ~2.0
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2024-10-26 16:57:29 UTC
README
1. Installation
The recommended way to install it is through Composer. Run the following command in order to install it:
composer require dotzecker/tuiter
2. Usage
First, download you Twitter archive by clicking "Request your archive" in https://twitter.com/settings/account.
The API is very simple and intuitive:
use Tuiter\Tuiter; // Let's load our archive $tweets = Tuiter::fromArchive(__DIR__ . '/your/awesome/path/to/tweets.csv');
Now you are able to manage your tweets in a fluent way, for example:
$unwantedTweets = $tweets->retweets()->before('2014-05-20')->get();
This is the list of available filters:
->retweets($are = true)
->replies($are = true)
->before($date)
->after($date)
->between($startDate, $endDate)
->contains($text, $contains = true)
->containsInUrl($text)
3. Delete Tweets
In order to delete tweets from your timeline, the implementation is:
use Tuiter\TweetDestroyer; $destroyer = TweetDestroyer::withParams( 'Consumer Key', 'Consumer Secret', 'Access Token', 'Access Token Secret' ); foreach ($unwantedTweets as $tweet) { $destroyer->destroy($tweet); }