naif / nova-twitter-timeline
A Laravel Nova card that display the latest user timeline and mentions tweets
v1.0
2018-08-24 20:00 UTC
Requires
- php: >=7.1.0
This package is not auto-updated.
Last update: 2024-11-12 13:37:13 UTC
README
Add a card to Nova dashboard that display the latest user timeline and mentions tweets
Installation
You can install the package in to a Laravel app that uses Nova via composer:
composer require naif/nova-twitter-timeline
Usage:
Add the below to app/Providers/NovaServiceProvder.php
public function card() { return [ new \Naif\NovaTwitterTimeline\NovaTwitterTimeline(), ]; }
Create a twitter app and obtain your API keys from https://developer.twitter.com
Add the below to your /config/services.php
'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', ''), ],
Add the below to your .env file
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
Support:
https://www.linkedin.com/in/naif
License
The MIT License (MIT). Please see License File for more information.