{"id":451,"date":"2012-11-16T09:27:05","date_gmt":"2012-11-16T09:27:05","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/oauth-twitter-feed-for-developers\/"},"modified":"2017-03-14T14:11:40","modified_gmt":"2017-03-14T14:11:40","slug":"oauth-twitter-feed-for-developers","status":"closed","type":"plugin","link":"https:\/\/bg.wordpress.org\/plugins\/oauth-twitter-feed-for-developers\/","author":9921224,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.3.0","stable_tag":"2.3.0","tested":"4.7.33","requires":"3.4","requires_php":"","requires_plugins":"","header_name":"oAuth Twitter Feed for Developers","header_author":"Liam Gladdy (Storm Consultancy)","header_description":"","assets_banners_color":"","last_updated":"2017-03-14 14:11:40","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/stormconsultancy.co.uk","header_plugin_uri":"","header_author_uri":"https:\/\/stormconsultancy.co.uk","rating":4.6,"author_block_rating":0,"active_installs":20000,"downloads":829639,"num_ratings":0,"support_threads":1,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0":{"tag":"1.0","author":"stormuk","date":"2012-11-16 10:58:05"},"1.0.1":{"tag":"1.0.1","author":"stormuk","date":"2012-11-16 11:24:19"},"1.0.2":{"tag":"1.0.2","author":"stormuk","date":"2012-11-16 11:29:51"},"1.0.3":{"tag":"1.0.3","author":"stormuk","date":"2012-11-22 20:44:13"},"1.0.4":{"tag":"1.0.4","author":"stormuk","date":"2012-11-23 08:09:47"},"1.0.5":{"tag":"1.0.5","author":"stormuk","date":"2012-11-23 08:18:01"},"1.0.6":{"tag":"1.0.6","author":"stormuk","date":"2012-11-29 09:01:12"},"2.0":{"tag":"2.0","author":"stormuk","date":"2013-01-31 15:07:21"},"2.0.1":{"tag":"2.0.1","author":"stormuk","date":"2013-01-31 15:21:05"},"2.0.2":{"tag":"2.0.2","author":"stormuk","date":"2013-01-31 15:48:26"},"2.0.3":{"tag":"2.0.3","author":"stormuk","date":"2013-01-31 15:59:19"},"2.1":{"tag":"2.1","author":"stormuk","date":"2013-12-12 09:13:43"},"2.1.1":{"tag":"2.1.1","author":"stormuk","date":"2013-12-12 09:21:21"},"2.1.2":{"tag":"2.1.2","author":"stormuk","date":"2013-12-12 09:25:43"},"2.1.3":{"tag":"2.1.3","author":"stormuk","date":"2013-12-13 15:08:44"},"2.1.4":{"tag":"2.1.4","author":"stormuk","date":"2013-12-13 15:36:32"},"2.2.0":{"tag":"2.2.0","author":"stormuk","date":"2014-02-08 12:07:51"},"2.2.1":{"tag":"2.2.1","author":"stormuk","date":"2015-04-20 19:26:48"},"2.3.0":{"tag":"2.3.0","author":"lgladdy","date":"2017-03-14 14:11:40"}},"upgrade_notice":[],"ratings":{"1":"1","2":"2","3":0,"4":"1","5":"25"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","2.0","2.0.1","2.0.2","2.0.3","2.1","2.1.1","2.1.2","2.1.3","2.1.4","2.2.0","2.2.1","2.3.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[252,2061,2080,159],"plugin_category":[38,56],"plugin_contributors":[78098,78097],"plugin_business_model":[],"class_list":["post-451","plugin","type-plugin","status-closed","hentry","plugin_tags-feed","plugin_tags-oauth","plugin_tags-tweets","plugin_tags-twitter","plugin_category-authentication","plugin_category-social-and-sharing","plugin_contributors-lgladdy","plugin_contributors-stormuk","plugin_committers-lgladdy","plugin_committers-stormuk"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/oauth-twitter-feed-for-developers.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>A Twitter API 1.1 compliant wordpress plugin that provides an array of a users timeline from Twitter for use by theme developers.<\/p>\n\n<p>The new Twitter API requires you be oAuth'd before you can request a list of tweets, this means that all of the existing Twitter plugins that simply make an AJAX request for to the JSON API endpoint broke in March 2013.<\/p>\n\n<p>This wass a major problem for the vast majority of websites that are currently using twitter, so we built a PHP class that implements all the new requirements for authentication and gives you an array of tweets out of the other end, for you to use in your PHP applications, or WordPress theme.  You can find the stand-alone <a href=\"https:\/\/github.com\/stormuk\/storm-twitter\">StormTwitter<\/a> class on GitHub<\/p>\n\n<p>This plugin wraps our Twitter class and provides a settings screen for easy integration into WordPress.  However, it's definitely for developers - you only get a PHP array out of it that contains Twitter tweet objects. You'll still need to style the output and make it comply with the new display requirements.<\/p>\n\n<p>This plugin does not provide sidebar widgets, shortcodes or any other form of drop-in functionality.  You still need to do the styling, we've just done the heavy lifting for you!<\/p>\n\n<p>Here's some example code for outputting the tweets in HTML:<\/p>\n\n<p>https:\/\/github.com\/stormuk\/storm-twitter-for-wordpress\/wiki\/Example-code-to-layout-tweets<\/p>\n\n<h3>Credits<\/h3>\n\n<p>Uses Abraham Williams's Twitter OAuth class.<\/p>\n\n<h3>About<\/h3>\n\n<p>Version: 2.3.0<\/p>\n\n<p>Written by Liam Gladdy of Storm Consultancy - <a href=\"http:\/\/www.stormconsultancy.co.uk\">http:\/\/www.stormconsultancy.co.uk<\/a><\/p>\n\n<p>Storm Consultancy are a web design and development agency based in Bath, UK.<\/p>\n\n<p>If you are looking for a <a href=\"http:\/\/www.stormconsultancy.co.uk\">Bath WordPress Developer<\/a>, then <a href=\"http:\/\/www.stormconsultancy.co.uk\/contact\">get in touch<\/a>!<\/p>\n\n<h3>License<\/h3>\n\n<p>Copyright (c) 2016 Liam Gladdy and Storm Consultancy (EU) Ltd, \n<a href=\"https:\/\/gladdy.uk\/\">https:\/\/gladdy.uk\/<\/a>, <a href=\"http:\/\/www.stormconsultancy.co.uk\/\">http:\/\/www.stormconsultancy.co.uk\/<\/a><\/p>\n\n<p>Permission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and\/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:<\/p>\n\n<p>The above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.<\/p>\n\n<p>THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<\/p>\n\n<!--section=installation-->\n<p>Install the plugin using the plugin manager, or upload the files to your wp-content\/plugins directory.<\/p>\n\n<p>Navigate to the Settings &gt; Twitter Feed Auth.<\/p>\n\n<p>Here you'll find settings fields to authenticate with Twitter.  You'll need to create a new Application on http:\/\/dev.twitter.com\/apps.<\/p>\n\n<p>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.<\/p>\n\n<p>Now, anywhere in your theme files you can call the <code>getTweets()<\/code> function to retrieve an array of tweets.<\/p>\n\n<p>You can then loop over the array and do whatever you want with it.<\/p>\n\n<pre><code>    &lt;?php\n          $tweets = getTweets($number_of_tweets, $twitter_screenname_to_load, $optional_array_of_any_additional_twitter_api_parameters);\n          var_dump($tweets);\n\n          foreach($tweets as $tweet){\n            var_dump($tweet);\n          }\n        ?&gt;\n<\/code><\/pre>\n\n<p>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 <code>getTweets(1)<\/code><\/p>\n\n<p>The following default options are used unless you override them in the optional array of additional parameters.<\/p>\n\n<ul>\n<li>Trim the user object (\"trim_user\" =&gt; true)<\/li>\n<li>Exclude replies (\"exclude_replies\" =&gt; true)<\/li>\n<li>Exclude retweets (\"include_rts\" =&gt; false)<\/li>\n<\/ul>\n\n<p>Results are cached for 1 hour (by default) to help you avoid hitting the API limits.<\/p>\n\n<!--section=changelog-->\n<h4>2.3.0<\/h4>\n\n<ul>\n<li>Support for WordPress's new internationalization system.<\/li>\n<\/ul>\n\n<h4>2.2.1<\/h4>\n\n<ul>\n<li>Grah! Fixes a fairly major issue where if not loading from a cache, the tweet cache is an object, rather than an array. This should be configurable (maybe in 2.3), but for now - fix it. <\/li>\n<\/ul>\n\n<h4>2.2.0<\/h4>\n\n<ul>\n<li>Check if any of our libraries are loaded by other plugins. If so, don't load them and produce a warning in our settings. This will prevent fatal errors when any other plugin uses OAuth or TwitterOAuth.<\/li>\n<\/ul>\n\n<h4>2.1.3<\/h4>\n\n<ul>\n<li>Fixes 2.1 for people using the very old getTweets($int) syntax. You should still change to the new version, but this will at least not be broken!<\/li>\n<\/ul>\n\n<h4>2.1.2<\/h4>\n\n<ul>\n<li>Just a version bump - I'm the worst at remembering to update all the right places.<\/li>\n<\/ul>\n\n<h4>2.1.1<\/h4>\n\n<ul>\n<li>Add support for a proxy server, as defined in wp-settings.php (Thanks, josmeer)<\/li>\n<\/ul>\n\n<h4>2.1<\/h4>\n\n<ul>\n<li>Change default and prefered method of calling to username, then count (For backwards compatibility, both will work)<\/li>\n<li>Only include OAuth if an OAuthRequest class isn't already defined. This should stop some errors some folks have with other plugins.<\/li>\n<li>Bug Fixes<\/li>\n<\/ul>\n\n<h4>2.0.3<\/h4>\n\n<ul>\n<li>Further defensive code against twitter abnormalities <\/li>\n<\/ul>\n\n<h4>2.0.2<\/h4>\n\n<ul>\n<li>Be a touch more graceful when Twitter is down or returning invalid data.<\/li>\n<li>Please make sure twitter is online before you upgrade - The update invalidates your cache and will display an error if twitter is offline.<\/li>\n<\/ul>\n\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>Please make sure twitter is online before you upgrade - The update invalidates your cache and will display an error if twitter is offline.<\/li>\n<li>Fix an issue with upgrading from 1.0.6, which turned out to not be an issue at all, and is actually because twitter went down and scared me very much.<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Support multiple screennames<\/li>\n<li>Support additional parameters to pass on to twitter (for excluding RTs, etc)<\/li>\n<li>Support custom cache expiry<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Make the plugin actually work properly!<\/li>\n<li>Correct documentation files for inclusion by wordpress<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>First version<\/li>\n<\/ul>","raw_excerpt":"Twitter API 1.1 compliant plugin that provides a function to get an array of tweets from the auth&#039;d users Twitter feed for use in themes.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bg.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bg.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=451"}],"author":[{"embeddable":true,"href":"https:\/\/bg.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/stormuk"}],"wp:attachment":[{"href":"https:\/\/bg.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=451"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=451"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=451"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=451"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=451"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}