PHP code example of scripter-co / twitter-stream-bundle
1. Go to this page and download the library: Download scripter-co/twitter-stream-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
scripter-co / twitter-stream-bundle example snippets
php composer.phar update scripter-co/twitter-stream-bundle
namespace Acme\CoreBundle\EventHandler;
class RequestEventHandler
{
public $_container;
public function __construct($container)
{
$this->_container = $container;
}
public function processTweet($request_event)
{
$tweet_model = $request_event->getTweet();
// tweet id
echo $tweet_model->get('id');
// user screen name
echo $tweet_model->get('user')->get('screen_name')
}
}