WordPress.org

Ready to get started?Download WordPress

Plugin Directory

oAuth Twitter Feed for Developers

Twitter API 1.1 compliant plugin that provides a function to get an array of tweets from the auth'd users Twitter feed for use in themes.

Install the plugin using the plugin manager, or upload the files to your wp-content/plugins directory.

Navigate to the Settings > Twitter Feed Auth.

Here you'll find settings fields to authenticate with Twitter. You'll need to create a new Application on http://dev.twitter.com/apps.

Once you've create the app, scroll down the app's details page to find the oAuth section. Copy the consumer secret and consumer key into the settings page for the plugin. Then click the Create Access Token button at the bottom of the Twitter app page. Copy the Access token and Access token secret into the plugin's settings page. Finally, enter the Twitter username of the feed you want to access. Save the settings.

Now, anywhere in your theme files you can call the getTweets() function to retrieve an array of tweets.

You can then loop over the array and do whatever you want with it.

`<?php
  $tweets = getTweets($number_of_tweets, $twitter_screenname_to_load, $optional_array_of_any_additional_twitter_api_parameters);
  var_dump($tweets);

  foreach($tweets as $tweet){
    var_dump($tweet);
  }
?>`

You can specify a number of tweets to return (up to 20) by passing a parameter to the function. For example, to display just the latest tweet you'd request getTweets(1)

The following default options are used unless you override them in the optional array of additional parameters.

  • Trim the user object ("trim_user" => true)
  • Exclude replies ("exclude_replies" => true)
  • Exclude retweets ("include_rts" => false)

Results are cached for 1 hour (by default) to help you avoid hitting the API limits.

Requires: 3.4 or higher
Compatible up to: 3.8.3
Last Updated: 2014-2-18
Downloads: 69,601

Ratings

4 stars
4.7 out of 5 stars

Support

1 of 2 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,2,2
86,7,6
0,1,0
0,1,0 100,1,1
100,1,1 100,1,1