Download the PHP package atomicsmash/twitter-feed-wordpress without Composer
On this page you can find all versions of the php package atomicsmash/twitter-feed-wordpress. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download atomicsmash/twitter-feed-wordpress
More information about atomicsmash/twitter-feed-wordpress
Files in atomicsmash/twitter-feed-wordpress
Package twitter-feed-wordpress
Short Description Atomic Smash - Twitter Feed for WordPress
License
Homepage http://www.atomicsmash.co.uk/
Informations about the package twitter-feed-wordpress
Twitter feed for WordPress
Installation
To make the class available, please add the following to your composer file:
Next, create a twitter app and generate your API access keys here.
Then add these inside your environment specific constants to your wp-config file, filling in the values as appropriate:
At the current time you can only have one twitter feed per site however this may be changed in the future.
Pulling Tweets from a Specific User
Just add a constant specifying the username:
Don't worry about adding the '@' symbol. For example
define('TWITTER_USERNAME','atomicsmash')
Using feed in theme
You can query the cached tweets simply by calling the get
method of the
twitterAPI class:
Parameter | Type | Description |
---|---|---|
results_per_page |
int | The number of results to show per page |
order |
string | desc for newest first, asc for oldest |
tweet_type |
string | One of all , tweet , retweet or reply . What kind of tweets should be returned. |
Background syncing
To sync tweets in background, schedule a cron job to run the command:
If you are using composer in your project, then your WordPress core files might be inside a subfolder. Please modify the path to reflect this. The cron job might look like this:
All versions of twitter-feed-wordpress with dependencies
guzzlehttp/guzzle Version 6.2.1
guzzlehttp/oauth-subscriber Version 0.3.*