A Symfony bundle providing a Twitter reader for asynchronous reading
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.
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 command php 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
make tests
make qa