=== Simple Twitter Data === Contributors: dartiss Donate link: http://tinyurl.com/bdc4uu Tags: Twitter, API, profile, image, location, user, social, data Requires at least: 2.0.0 Tested up to: 3.1 Stable tag: 1.2.1 Simple Twitter Data uses the Twitter API to return basic user data. == Description == How you wish to use this plugin is up to you - display your Twitter profile, show your last tweet, show others. Maybe add a twitter username column for commenters to fill in and then display their details against this comments? To grab Twitter data you will need to insert the following code, where appropriate, into your theme… `` Where `paras` is a list of parameters, separated by an ampersand.. **user=** : This is the Twitter username **data=** : This is the list of Twitter data that you wish to have returned. Each data item must be separated by a comma. The possible items are as follows... * name * location * description * image (a 48 pixel version of the users Twitter image) * image73 (a 73 pixel version of the users Twitter image) * followers * following * status (your last Tweet) * source (where the last Tweet came from) * url (the users homepage) * created (the timestamp of the last Tweet) * relative (the relative time since the last Tweet - e.g. "2 hours ago") * id (the URL of the last Tweet) **cache=** : Twitter data is cached locally for a number of hours - use this option to specify the number of hours that a cache should be used for. The default is 0.5. Specify `NO` to switch off caching. The following 2 parameters are only relevant to any links contained with a returned Tweet (by default all Tweets will be HTML character encoded and URLs will have links)... **nofollow=** - If specified as `ON` this will turn on the `NOFOLLOW` attribute for the links. By default, this is switched off. **target=** - Allows you to override the standard `TARGET` of `_BLANK`. Data is returned in an array, with the data item being the array element. An example would be... `` This asks for the name and status of the user 'dartiss' and makes it cache the results for 24 hours. `$return_data['name']` will contain the name. `$return_data['status']` will contain the status. The following is an example of how it could be used, with a `function_exists` check so that it doesn't cause problems if the plugin is not active... ` ` After version 1.1, there is an additional function which will return the number of times a URL has been referenced. This will work with shortened URLs as well, so the count will reflect the resultant URL, not the shortened version. The format is... `` Where 'url' is the URL that you wish to return a count for and 'paras', as above, passes parameters, seperated by an ampersand. 'paras' is optional. At the moment there is only one parameter... **cache=** : Twitter data is cached locally for a number of hours - use this option to specify the number of hours that a cache should be used for. The default is 0.5. Specify `NO` to switch off caching. From version 1.2 there is also a way to embed Twitter data directly into your posts and pages. Simply type [twitter user=username data=dataitem] into any post/page, where username is the Twitter username and dataitem is the data item that you required. For example, to display my location information, you could put in a post... David lives in [twitter user=dartiss name=location] This would display as... David lives in Nottingham, UK **For help with this plugin, or simply to comment or get in touch, please read the appropriate section in "Other Notes" for details. This plugin, and all support, is supplied for free, but [donations](http://artiss.co.uk/donate "Donate") are always welcome.** == Licence == This WordPRess plugin is licensed under the [GPLv2 (or later)](http://wordpress.org/about/gpl/ "GNU General Public License"). == Support == All of my plugins are supported via [my website](http://www.artiss.co.uk "Artiss.co.uk"). Please feel free to visit the site for plugin updates and development news - either visit the site regularly, follow [my news feed](http://www.artiss.co.uk/feed "RSS News Feed") or [follow me on Twitter](http://www.twitter.com/artiss_tech "Artiss.co.uk on Twitter") (@artiss_tech). For problems, suggestions or enhancements for this plugin, there is [a dedicated page](http://www.artiss.co.uk/simple-twitter-data "Simple Twitter Data") and [a forum](http://www.artiss.co.uk/forum "WordPress Plugins Forum"). The dedicated page will also list any known issues and planned enhancements. Alternatively, please [contact me directly](http://www.artiss.co.uk/contact "Contact Me"). **This plugin, and all support, is supplied for free, but [donations](http://artiss.co.uk/donate "Donate") are always welcome.** == Installation == 1. Upload the entire simple-twitter-data folder to your wp-content/plugins/ directory. 2. Ensure the cache folder within the plugins folder is fully writable - ie. [change its permissions](http://codex.wordpress.org/Changing_File_Permissions "Changing File Permissions") to 777. 2. Activate the plugin through the 'Plugins' menu in WordPress. 3. There is no options screen - configuration is done in your code. == Frequently Asked Questions == = Why do I need to request specific Twitter fields? Why can't I just have all of them everytime? = Each field has to be found in the XML returned from Twitter - the more you request the more time it takes the plugin. Therefore requesting ONLY those that you require ensures maximum plugin efficiency. = Which version of PHP does this plugin work with? = It has been tested and been found valid from PHP 4 upwards. == Changelog == = 1.0 = * Initial release = 1.1 = * Added get_twitter_count function to return a count of references to a URL = 1.2 = * Added image73 as a new data item to request * Added inline tag function to add Twitter data dynamically to posts and pages * Updated shared functions = 1.2.1 = * Fixed file fetching bug == Upgrade Notice == = 1.2.1 = * Upgrade to fix critical file fetching bug