PHP code example of naif / nova-twitter-timeline

1. Go to this page and download the library: Download naif/nova-twitter-timeline 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/ */

    

naif / nova-twitter-timeline example snippets



public function card()
{
    return [
        new \Naif\NovaTwitterTimeline\NovaTwitterTimeline(),
    ];
}

    'nova_twitter_timeline' => [
        'consumer_key' => env('TWITTER_CONSUMER_KEY', ''),
        'consumer_key_secret' => env('TWITTER_CONSUMER_SECRET', ''),
        'access_token' => env('TWITTER_ACCESS_TOKEN', ''),
        'access_token_secret' => env('TWITTER_ACCESS_TOKEN_SECRET', ''),
        'timeline' => env('TWITTER_TIMELINE', ''),
        'tweets_count' => env('TWITTER_TWEETS_COUNT', ''),
    ],


TWITTER_CONSUMER_KEY=###################################
TWITTER_CONSUMER_SECRET=################################
TWITTER_ACCESS_TOKEN=###################################
TWITTER_ACCESS_TOKEN_SECRET=############################
TWITTER_TIMELINE=mentions_timeline // here you can set what timeline you would like to retrieve (mentions_timeline OR user_timeline)
TWITTER_TWEETS_COUNT=5 // here is the count of tweets you would like to retrieve Max: 200