Skip to content

All in one solution for twitter usage at wordpress

Notifications You must be signed in to change notification settings

osbulbul/wp_twitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

WP_Twitter

This will be all in one solution for wordpress theme or plugin creators. Currently, it can be just return tweets in easy way. This library is based on twitter-api-php.

Installation

You should just copy the wp_twitter folder anywhere in your theme or plugin. Then you should include the WP Twitter class in your file. Like that;

require_once('wp_twitter/WP_Twitter.php');

Now, you are ready to go!

How to Use

After you include the library you can use the main class. For example;

$WP_Twitter = new WP_Twitter($oauth_access_token, $oauth_access_token_secret, $consumer_key, $consumer_secret);
print_r($WP_Twitter->tweets('twitter_username',(int how many tweets), (int how many minutes for cache)));

Thats it! It will return an array of latest tweets.

How It Works

We can't always get tweets from twitter api because of limitations. So we should cache it. This library cache tweets to the database. And it will refresh based on your choice.

About

All in one solution for twitter usage at wordpress

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages