SimpleTwit
A plugin for developers and designers that sets up a WP_Cron to pull in and cache a user’s stream using OAuth and the Twitter v1.1 REST API. It’s all that a developer needs to incorporate a Twitter feed on their site, the OAuth handling, caching to avoid rate limiting, and utilities to easily format
About this tool.
A plugin for developers and designers that sets up a WP_Cron to pull in and cache a user’s stream using OAuth and the Twitter v1.1 REST API. It’s all that a developer needs to incorporate a Twitter feed on their site, the OAuth handling, caching to avoid rate limiting, and utilities to easily format Tweets correctly without predefined styles to work around. For designers, the plugin creates a widget that can be used to easily display and style Tweets in your theme.
Features
- Provides access to a user’s Tweets for both designers and developers
- Creates a widget for easy display of the latest Tweets in your theme’s sidebar
- Clearly designates Retweets and Replies to allow easy styling and manipulation
- Easily set Username and OAuth credentials
- Caches Tweets to prevent rate limiting problems
- Hooks into WP_Cron for easy installation and automatic API calls
- Uses OAuth and the v1.1 Twitter REST API
Usage
There are two main ways to access the Tweets, one aimed at developers and one aimed at designers.
For Designers
This plugin creates a widget that allows display of the most recent Tweets in any sidebar in your theme. When adding the widget you can customize how many Tweets and what information is displayed, choosing from content, time, author, and source. The widget outputs HTML5 which with classes to style on every element, including flagging Tweets as Retweets and Replies. You will be able to style this widget to look exactly as you need it it to.
For Developers
For those with something special in mind and willing to get their hands dirty, this plugin provides powerful access to the DB of Tweets. Tweets can be grabbed through a template tag and are provided in a special object jam packed with features:
STF_Tweet
An array of these objects is returned by the template tag instead of the WP_Post object, or an individual can be constructed by passing the post ID of the Tweet to the object constructor.
The object provides a number of useful methods when working with Tweets. This object has the following accessible properties:
- is_retweet – This boolean will be true when the Tweet is a Retweet
- is_reply – This boolean will be true when the Tweet is a Reply to another Tweet