PHP code example of orweb / easy-last-tweet

1. Go to this page and download the library: Download orweb/easy-last-tweet 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/ */

    

orweb / easy-last-tweet example snippets



// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new \Orweb\EasyLastTweetBundle\OrwebEasyLastTweetBundle(),
    );
    // ...
}


// src/controller/someController.php
public function someAction()
{
    $tweets = $this->get('orweb.twitter')->getLastTweets($screen, $number);
    // ...
    
    //if you want retweets and mention 
    $tweets = $this->get('orweb.twitter')->getLastTweets($screen, $number, false, true,true);
}