atomicsmash / apis
Atomic Smash - Atomis APIS
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 622
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 0
Open Issues: 1
Type:wordpress-plugin
Requires
- composer/installers: v1.0.6
- guzzlehttp/guzzle: ~6.0
- guzzlehttp/oauth-subscriber: 0.3.*
This package is auto-updated.
Last update: 2024-03-17 08:50:23 UTC
README
Installing
To install add this to your composer file:
"atomicsmash/apis" : "dev-master"
Setup Twitter API
Create a twitter app and generate API access keys from https://apps.twitter.com/.
Then add these inside your environment specific constants to your wp-config file:
define('TWITTER_CONSUMER_KEY','xxxxxxxxxxxxxxxxxxx'); define('TWITTER_CONSUMER_SECRET','xxxxxxxxxxxxxxxxxxx'); define('TWITTER_OAUTH_TOKEN','xxxxxxxxxxxxxxxxxxx'); define('TWITTER_OAUTH_TOKEN_SECRET','xxxxxxxxxxxxxxxxxxx');
Using API in theme
You can query the cached tweet by using:
$args['results_per_page'] = 2; $tweets = $twitterAPI->get($args);
Current arguments include:
- results_per_page
- order
Todo
- Get API options into the admin interface
- Have a look at turning the classes and different classes into an 'interface'