Wordpress plugins
Fetch Tweets

Fetch Tweets

Version : 2.6.3
Tested up to : 4.7.6
Number of download : 63111
Average rating : 5 / 5 on 33 votes 33 votes, 5 avg.rating

Screenshots

Fetch Tweets
Fetch Tweets
Fetch Tweets
Fetch Tweets

It displays tweets in the sidebar, posts, and pages. It does not rely on JavaScript so the tweets will be displayed to visitors disabling JavaScript in their browsers. Not only can you show your own tweets but also the mashed up results of multiple user’s timelines. It is easy to set up for WordPress beginners. It does not require you to provide authentication keys. Media files are automatically displayed such as YouTube videos and photos posted in tweets. You can disable them with the setting. It allows developers to write additional add-ons and templates. One of the extensions, Feeder, supports feeds so you can subscribe your favorite person’s tweets as RSS, which has become harder as the Twitter API was upgraded and the previous version no longer support tweet feed without authentication keys. With this addon, if you are a programmer, you can import the tweet data as JSON to your application by making the WordPress as own Twitter API server. If you are a theme developer, you can easily customize the template for the tweet outputs. Just copy the existing template and modify the copied files and rename the template name. Then place the copied folder into the theme folder. And there you go! Your own template will be listed in the plugin’s setting page. This way, when the plugin updates, you won’t loose your modifications. Features Fetching Timeline – by specifying the user name, the timeline can be fetched and displayed as well as your account’s home timeline. Search Results – by specifying the search keyword, the results can be fetched and displayed. Lists – tweet timeline for members of the specified list can be fetched and displayed. Custom API Query – if you are a developer and familiar with Twitter API, you can directly specify the query url to send to Twitter. Tweet ID – you can fetch tweets by Tweet ID. Mashups – you can display the combined results from multiple rule sets of your choosing. Widget – tweets can be displayed in the widgets that the plugin provides. Shortcode – with the shortcode, the fetched tweets can be displayed in posts and pages. PHP Code – with the PHP function, the fetched tweets can be embedded in the templates. Custom Templates – you can change the design by modifying/creating the template file. Background Cache Renewal – it renews the caches in the background so it will prevent the page load from suddenly getting stuck for fetching external sources. Embedded Media – urls of media elements can be automatically converted to embedded elements. URL Query – show tweets by setting a url query key such as ?screen_name=yourscreenamehere to dynamically display tweets. Server-side Processing – the outputs of tweets are handled server-side. This means even your visitors turn off JavaScript in their browsers, tweets will be visible and search engines can catch those contents. Shortcode and Function Parameters The following parameters can be used for the shortcode or the PHP function of the plugin, fetchTweets() id – the ID(s) of the rule set. This cannot be used with the tag, q, or screen_name parameter. e.g. [fetch_tweets id=”123″] 123 ) ); ?> In order to set multiple IDs, pass them with commas as the delimiter. e.g. [fetch_tweets id="123, 234, 345"] <?php fetchTweets( array( 'id' => '123, 234, 345' ) ); ?> tag – the tag(s) associated with the rule sets. This cannot be used with the id, q, or screen_name parameter. e.g. [fetch_tweets tag=”WordPress”] ‘WordPress’ ) ); ?> In order to set multiple tags, pass them with commas as the delimiter. e.g. [fetch_tweets tag="WordPress, developer"] <?php fetchTweets( array( 'tag' => 'WordPress, developer' ) ); ?> operator – the database query operator that is performed with the tag parameters. Either AND, NOT IN, or IN can be used. If this parameter is not set, IN will be used as the default value. For more information about this operator, refer to the Taxonomy Parameter section of Codex. e.g. [fetch_tweets tag=”WordPress, PHP, JavaScript” operator=”IN” ] ‘WordPress, PHP, JavaScript’, ‘operator’ => ‘IN’ ) ); ?> [fetch_tweets tag=”developer” operator=”NOT IN” ] ‘developer’, ‘operator’ => ‘NOT IN’ ) ); ?> q – the search keyword. This cannot be used with the id, tag, or screen_name parameter. e.g. [fetch_tweets q=”#wordpress” lang=”en”] ‘#wordpress’, ‘lang’ => ‘en’ ) ); ?> screen_name – the screen name(s). To pass multiple screen names, pass them separated by commas. This cannot be used with the id, tag, or q parameter. e.g. [fetch_tweets screen_name=”WordPress,photomatt”] ‘WordPress,photomatt’ ) ); ?> count – the maximum number of tweets to display. e.g. [fetch_tweets id=”456, 567″ count=”10″ ] ‘456, 567’, ‘count’ => 10 ) ); ?> avatar_size – the size( max-width ) of the profile image in pixel. e.g. [fetch_tweets id=”678″ count=”8″ avatar_size=”96″ ] 678, ‘count’ => 8, ‘avatar_size’ => 96 ) ); ?> twitter_media – true (1) / false (0). Determines whether the twitter media elements should be displayed. external_media – true (1)/ false (0). Determines whether the external media links should be replaced with embedded elements. [fetch_tweets id=”678″ twitter_media=”0″ external_media=”1″ ] 678, twitter_media=”0″ external_media=”1″ ) ); ?> get – [2.4.0+] true (1) / false (0). Converts URL query key-values of the HTTP GET method into the functiom/shortcode arguments. [fetch_tweets get=”1″ ] true, ) ); ?> Then access the page that has the shortcode or the page by passing the arguments in the url. http://your-site.domain/page-slug/?screen_name=miunosoft http://your-site.domain/page-slug/?q=wordpress show_error_on_no_result – [2.4.7+] true / false. Determines whether a message should be shown when no result is fetched. apply_template_on_no_result – [2.4.8+] true / false. Determines whether a plugin template should be applied to the fetched tweets data when no result is fetched. How to Create Own Template Step 1 Copy the folder named plain or single in the plugin’s template folder. Rename the copied folder to something you like. Step 2 Edit the following files. style.css – defines the template’s CSS rules. Also some of the information in the header comment sections will appear in the template listing table. template.php – defines the layout of the tweets. PHP coding skill is required. functions.php (optional) – loaded if the template is activated when the plugin starts. If you don’t edit this file, do not include it. Be careful not to declare any PHP function or class that is already declared in the original file. settings.php (optional) – loaded only in the admin area if the template is activated. If you don’t edit this file, do not include it. Be careful not to declare any PHP function or class that is already declared in the original file. In the style.css file, include the comment area ( with /* */ ) at the top of the file with the following entries. Template Name: – the template name. Author: – your name. Author URI: – your web site url. Description: – a brief description about the template. Version: – the version number of the template. e.g. /** * Template Name: Sample * Author: Michael Uno * Author URI: http://en.michaeluno.jp * Description: A very simple sample template added as a WordPress plugin. * Version: 1.0.0 */ Step 3 (optional) Include a thumbnail image. Prepare an image with the name screenshot.jpg, screenshot.png, or screenshot.gif, and place the image in the working(copied in step 1) folder. Step 4 Create a folder named fetch-tweets in the theme folder. If you use, for instance, Twenty Twelve, the location would be .../wp-content/themes/twentytwelve/fetch-tweets/. Place the working folder (the copied and renamed one in step 1) in there. The plugin will automatically detect it and the template will be listed in the Template page of the admin page. Optionally, a template can be added via a plugin. If you do so, add the template directory with the fetch_tweets_filter_template_directories filter hook. e.g. function FetchTweets_AddSampleTemplateDirPath( $aDirPaths ) { // Add the template directory to the passed array. $aDirPaths[] = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'sample'; return $aDirPaths; } add_filter( 'fetch_tweets_filter_template_directories', 'FetchTweets_AddSampleTemplateDirPath' ); An example template is available here.

Download now