A Symfony bundle providing a Twitter reader for asynchronous reading
- Demo: https://asynctweets.alexislefebvre.com/demo/
- Code coverage: https://asynctweets.alexislefebvre.com/codecoverage/
- Doxygen: https://asynctweets.alexislefebvre.com/doxygen/
- ApiGen: https://asynctweets.alexislefebvre.com/apigen/
The goal of this project is to create an online Twitter reader, built with Symfony. AsyncTweets retrieves and stores your timeline, allowing to read your Twitter timeline even if you're away from your Twitter client for several days.
This bundle is also used to test several CI (Continuous Integration) services.
- Retrieve tweets by using User's Twitter keys
- Display the tweets with a pagination
- Display images below tweets
- Twitter keys
- PHP >= 7.2
- a database (must be supported by Doctrine2)
- Symfony (3.4+) with Composer
-
Install this bundle with Composer:
composer require alexislefebvre/async-tweets-bundle
-
Add the bundle in app/AppKernel.php:
<?php public function registerBundles() { $bundles = array( // ... new AlexisLefebvre\Bundle\AsyncTweetsBundle\AsyncTweetsBundle(), ); }
-
Enter your Twitter keys at the end of the app/config/parameters.yml file:
twitter_consumer_key: null twitter_consumer_secret: null twitter_token: null twitter_token_secret: null
-
Create the database and create the tables:
php app/console doctrine:schema:update --force --env=prod
-
Launch this command to fetch tweets:
php app/console statuses:hometimeline --table --env=prod
, with the--table
option the imported tweets will be shown -
Import the routes in your app/config/routing.yml:
asynctweets_website: resource: "@AsyncTweetsBundle/Resources/config/routing.yml" prefix: /asynctweets # Use only "/" if you want AsyncTweets at the root of the website
-
Open the page with your browser
.../YOUR_DIRECTORY/web/asynctweets/
or use the following commandphp app/console statuses:read --env=prod
to see tweets -
Add
php app/console statuses:hometimeline --env=prod
in your crontab (e.g. every hour) to retrieve tweets automatically
- symfony/symfony (3.4+)
- abraham/twitteroauth (^0.6.0)
- twitter/bootstrap (use Bootswatch 3.3.2)
make tests
make qa