=== Simple Twitter Data === Contributors: dartiss Donate link: http://tinyurl.com/bdc4uu Tags: Twitter, API, Profile Requires at least: 2.0.0 Tested up to: 2.9 Stable tag: 1.2 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 == 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 == = How can I get help or request possible changes = Feel free to report any problems, or suggestions for enhancements, to me either via my contact form or by the plugins homepage at http://www.artiss.co.uk/simple-twitter-data = 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. == 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