1d680bc42376b59d253701bc12d173ec

Fetch Tweets

Fetch Tweets from Twitter

This is a WordPress plugin that allows you to fetch tweets from twitter.com and display them anywhere you want such as in the sidebar, posts, and pages. Not only you can show your tweets to your visitors but also mash up multiple users’ timelines and display the combined results.

It is developer friendly and support additional add-ons and themes to be written by other developers. One of the extensions 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.

If you are a programmer, you can import the tweet data as JSON to your application by making the WordPress as the own Twitter API server with that extension. It’s called Feeder.

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. 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.

Screenshots

Usage

Coming soon…

Download

Fetch Tweets
(0.0 B)

58 thoughts on “Fetch Tweets

  1. Ron Mooij

    Hi Michael,

    Thnx for your great plugin.

    I’m using the ‘Single’ template to show tweets in a sidebar.
    All links open in a new Tab (Target=’_blank’), except when clicking on witter Media which open in the same Tab.

    I assume this has to do with this code in single\template.php:

    Enabling debugging of the array shows that [embed_twitter_media] contains among others a “<a href='https://twitter.com/….." without target=’_blank”.

    I can’t figure out how to correct this. Can you help?
    Regards,
    Ron

    Reply
  2. Subhan

    Hi Michael, how we use fetchTweets function to use custom query? I want to use direct without an create post an dashbord. Help me please.
    Thanks

    Reply
    1. Michael Uno Post author

      Hi,

      You may want to use the `fetchTweets( $aArguments, $bEcho=true )` function. The first parameter accepts an associative array of key-value pairs used for the HTTP GET method query you use in the url. The second parameter is whether to print or return a value.

      Hope this helps.

  3. Choi Han Choong

    Hi,
    I wanted to show the tweets from an author in the sidebar whenever their posts are viewed.
    I see that the plugin allow defining rules by screenname but this will require me to create a rule for each author.
    Assuming I have the author’s screenname in their profile, is possible to dynamically pass the screen name to the widget or shortcode without creating rules for each author?

    Regards.

    Reply
  4. Cor

    Really great plugin and I am very happy with it.
    Could it be a idea to implement a “blocking name” (@name_to_block) so some twitter people can be blocked?

    Reply
  5. Tina

    Hello Michael,

    I only found your plugin over the weekend. It does what I wanted to achieve, but only one of the rules is working.

    Let me start with describing what I would like to have:

    I’ve created a Rule by Search. To make sure the search syntax works I tried it first on Twitter (https://twitter.com/search-home) – works like a charm, shows the wanted result. But when I enter the same into the rule, I only get “No result could be fetched.” as a result.

    I’ve created another Rule by Search, using a specific hashtag and a specific from: – that worked from the first moment I saved the rule.

    What am I doing wrong??? I’m sure it’s a user failure ;-).

    Thanks in advance for your help and thanks for this nice plugin.

    Greetings,
    Tina

    Reply
    1. Michael Uno Post author

      Hi,

      Maybe check the options of Include Retweets and Exclude Replies. You may have changed those and thus got different results.

      Hope it helps!

    2. Tina

      Hi Michael,

      I checked what you recommended but nope. I don’t have the option “Retweets included” checked.

      Where can I find Exclude Replies?

      Thanks,
      Tina

    3. Michael Uno Post author

      The option is available with a rule by screen name.

      So is it always happening that when you resave the rule, the tweets no longer show up and the output says “No result could be fetched”?

    4. Tina

      Yes, that’s what happens. Result page: http://wp.me/P4BcZI-eN.

      This is what the *Tweets by Search” looks like in my rule:
      Search keyword: “bach 101” AND from:BachCentre

      If I use this exact search term on Twitter itself, I get the results I’m looking for.

      If I only use “bach 101” as search term in this rule I get results on the muscian Bach but no results from the Bach Centre.

      I have created a second rule which works fine. It’s also a *Tweets by Search* but there is a specific hashtag I can use and I have the feeling that’s the main difference between the rules. The search termin is: #BachBlüten AND from:BachCentre – – results: http://wp.me/P4BcZI-eJ.

      Thanks.

    5. Michael Uno Post author

      Tina,

      It looks like the tweets you are trying to retrieve are old and the Twitter Search API does not return results.

      According to their documentation,

      Also note that the search results at twitter.com may return historical results while the Search API usually only serves tweets from the past week.

      (source: https://dev.twitter.com/rest/public/search)

      In other words, they do not provide search results older a week or so.

      The plugin relies on Twitter API, so sorry.

      To show old tweets. you have to have tweet IDs of those. In order to have those IDs, you have to monitor tweets for a certain period. Still you cannot display tweets older than the period you had been monitoring.

      Also the plugin does not have the ability to monitor tweetrs. It jsut perform API queries and shows the results.

      However, if you really need to do it and hve some budgets, I may be able to write a custom extension for it. You can reach me via the contact form of the site.

    6. Tina

      Hi Michael,

      thank you!

      The quote from the Twitter documentation makes sense. The last tweet is October time.

      It’s not a MUST´but thanks for offering and your help.

      Tina

  6. Ben

    Hi Michael,

    I cannot get tweets to load, I get the error:

    No result could be fetched.

    I have tried on a local machine, on a live domain, and have used different accounts.

    Are there any known issues with the plugin that conflicts with JavaScript (Packery) or Isotope, or anything else?

    Thanks

    Ben

    Reply
    1. Michael Uno Post author

      Hi,

      You may check if the plugin is connected to Twitter.com via Dashboard -> Fetch Tweets -> Settings. You should see the status saying Authenticated. If it is connected, try creating a rule with various different screen names. If some of them work, it means the rule you get that error “No result could be fetched” has a problem. Maybe double check the screen name or the search term.

      As for a conflict, I have no idea.

      Hope it helps.

    2. Ben

      Thanks Michael,

      Yes it is connected – I manually entered the API keys. Actually, have used 2 seperate Twitter accounts. Both said ‘authenticated’ in the plugin, but then ‘no results could be fetched’ when using a rule to display a timeline, or a users’ profile.

      It isn’t a conflict – I have at least verified that.

      Anything you can suggest?

      Thanks

      Ben

    3. Michael Uno Post author

      Just to find out the cause of the problem, try creating a rule with different screen names or search terms.

      Let me know if you can display tweets with different rules.

  7. Kyla

    Hello! I have a site hosted on freehostia and my friend whos a pro with wp installed all that for me and recommended your plugin cause she uses it on her sites. She installed it for me but we’re having issues with setting it up by connecting. I log in via the connect button but it still says not authenticated. Is there anything I could be lacking with my free hosting? Or anything else you might recommend I do? Thanks!

    Reply
    1. Michael Uno Post author

      Can you try changing the other options of Fetch Tweets like one in the General tab? If you cannot change any option, that means the plugin has a problem with your site. If you can change the plugin options, that means the authentication process has a problem.

  8. Joe T.

    I can’t get my Tweets displayed in a sidebar widget but I know they’re being fetched.

    Here’s what happens: I go to “Edit Rule” and then click “Preview changes” in the “Publish” box. That takes me to a page (where is that page located on my website, by the way?) that shows my latest Tweet and, in the sidebar right next to the Tweet, a box that reads, “Joe’s Tweets. No results could be fetched.” How can I get the Tweets fetched into the sidebar itself?

    Thanks!

    Reply
    1. Michael Uno Post author

      You need to select the rule to display in the widget form. Navigate to `Dashboard` -> `Fetch Tweets` -> `Appearance` -> `Widgets`. Add a widget named `Fetch Tweets by Rule Set` to your desired sidebar. In the widget form, you should see a select field listing your created rules. Make sure you click(highlight) at least one.

      As for the location of the preview page, it can be accessed with the url starting with `http:://your-site-domain/?fetch_tweets=[post_id]` where [post_id] is the rule ID. If you have a particular permalink setting, it should be different and it may be something like `http:://your-site-domain/fetch_tweets/[post_id]`.

  9. aj

    How can I get the url of the tweets to open in a new tab / new window? I think it would not take much to insert a target tag but not sure where.

    Reply
    1. Michael Uno Post author

      You may want to take a look at the template.php file. It is located in ./template/plain/template.php and ./template/single/template.php.

      The n days ago link has the link to the tweet.

  10. Bob Russel

    I only seem to be getting comments that my daughter has posted (@CassJoyMusic), not those of others interacting with her. What do I do to get the rest of the conversations, along with who is posting the tweets?

    Reply
    1. Michael Uno Post author

      Sorry it’s not possible to fetch conversations as the plugin relies on the Twitter API. And the API does not provide such an endpoint.

  11. out0fstep

    how can I add a divider line between the tweets dislayed? i have it working here: dorkfeast.com is it possible to add a 1px black border around the box and add divider lines between the tweets?

    Reply
  12. cameron prudames

    Hi Michael, how can I duplicate the plain template as I want to run a rule that collects just 1 tweet from twitter to use as a headline but I don’t want to show an image or retweet buttons just the tweet.

    Reply
    1. Michael Uno Post author

      Hi Cameron,

      To disable images and intent buttons, it can be achieved with the shortcode.

      [fetch_tweets id="29" count="200" intent_buttons="0" twitter_media="0" external_media="0" ]

      Change the id and the count parameter values for your needs.

      To create a custom template, refer to the Other Notes section. If you are doing it for the first time, do not copy functions.php and settings.php described in the step 2 as those files require advanced PHP coding.

      Hope it helps.

    2. Michael Uno Post author

      If you want to remove only the time element, you have to modify the template.

      Otherwise, you may try adding visibilities="0" in the shortcode but this also removes the user name and the avatar.

  13. cameron prudames

    Love the plugin but it doesn’t seem to refresh the tweets. 🙁 They work fine for the first 2 minutes but then tweets are frozen and don’t update. I am working with tweets in lists btw. Any help would be greatfully received.

    Reply
    1. Michael Uno Post author

      Setting the cache duration to 0 likely causes the Twitter API rate limit to reach the limit. You can check the current status of API rate limit in the authentication page of the plugin which can be accessed via Dashboard -> Fetch Tweets -> Settings -> Authentication -> List Request Limit.

      If you see 0 / 180, it means that it is expired and has to wait for 15 minutes for the limit to get refreshed.

    2. cameron prudames

      I see this

      Timeline Request Limit 180 / 180 ( Will be reset at January 12, 2014, 10:09 am )
      Search Request Limit 180 / 180 ( Will be reset at January 12, 2014, 10:09 am )
      List Request Limit 180 / 180 ( Will be reset at January 12, 2014, 10:09 am )

    3. Michael Uno Post author

      180 / 180 means that 180 requests are remained. So tweets should be renewed.

      Do they change when you re-open the page after 2 minutes? Or do they stay the same? If they never change, which should not occur in any case, you should try disabling all the other plugins to see if something is preventing from retrieving the status.

    4. cameron prudames

      I really appreciate all the feedback. Still got problems though as the plugin is still not updating. I have deactivated all plugins and even swapped themes to a basic wordpress theme. Updates look good for first 2 mins still but when I check on twitter there seem to have been lots more tweets than appearing via the plugin. I have setup a special page that should show rapid tweets and the search is just LEEDS. On twitter this gets 30 new tweets per minute but not via the plugin which appears to be frozen. I can send you my direct email and links to the site if you want to check it out in the back end. Sorry for being a pain but it may help other who may be experiencing the similar problems.

    5. Michael Uno Post author

      What I can suggest is that:

      – when you see tweets not renewed, check the authentication status in the plugin page. Although you said you see 180/180, recheck the status after two minutes as the status page itself has a cache which expires in two minutes.

      – Enable the Cache for Errors option via Dashboard -> Fetch Tweets -> Settings -> General -> Cache Settings.

      – If the cause is due to the API limit, which probably it is, increase the cache duration option.

    6. cameron prudames

      If I empty the cache it works and loads new tweets but then stops again. What should I increase the cashe duration to. At the moment I have lots of rules set to different cache durations.

    7. Michael Uno Post author

      If I empty the cache it works and loads new tweets but then stops again

      Probably, you didn’t refresh the page.

      The workflow is like this:

      1. The page is opened by somebody and the plugin confirms the cache is expired. To prevent delays, the plugin returns the old tweets. Then schedule the WP Cron event and creates an access artificially to the WordPress installed site in the background. So the visitor still sees the old tweets at this point.

      2. The site is accessed in the background and WordPress sees the WP Cron task is scheduled and performs the registered task.

      3. The page is loaded again. The visitor sees the renewed tweets.

      So you need at least two page loads to see the refreshed tweets.

      What should I increase the cashe duration to. At the moment I have lots of rules set to different cache durations.

      It depends on how many API calls you need overall. Since the Twitter API allows 180 calls for 15 minutes, if you have only one rule and want to set the cache duration as less as possible, 5 seconds would work. But you said you have many rules then, you would need to figure out the appropriate value with try and error.

    8. cameron prudames

      hI, I’v edone everything you have said. I have also reduced the number of rules to just 5 but still no updates from twitter even when the page is refreshed. I really do love your plugin, it does everything I want it to do bar the refreshing aspect. Hope you can help. I can pay for you to take a closer look at my site to get this Fetch Tweets working.

    9. Michael Uno Post author

      Okay, let me try to replicate the problem you have. For that, I need your Fetch Tweets rules. You can send me the exported Fetch Tweets rules via email. The address is michael _at_ michaeluno.jp

      The rules can be exported by going to Dashboard -> Tools -> Export -> Check Fetch Tweets -> Download Export File.

      Please make sure there is no private list in the exported rules.

  14. Greg

    Is the scroll bar in Fetch Tweets coming from your code or my template? I’ll buy the ad remover for fetch tweets if you tell me how to get rid of it or at least adjust the height. And if it works out well I’ll look at the RSS extension.

    thx

    Reply
    1. Michael Uno Post author

      Hi Greg,

      Sorry for the delay. You can set the height to 100% so that the scroll bar will not appear. If you are displaying tweets with one of the widgets, the setting is in the widget form. If you are using the shorcode, you can set it via Dashboard -> Fetch Tweets -> Templates -> Settings (link of the template you are using).

      Hope it helps!

    2. js

      Hi,

      I am having the same problem and although I set height to 100% still the scrollbar appears.

      Furthermore what I would like to do is a 3×3 table where each cell shows tweets from different users. How could I at the same time avoid having the scrollbar and set that all the cells would have the same height?

      Regards

    3. Michael Uno Post author

      Regarding the scroll bar issue, I cannot tell how unless I see it. Do you have a live site that I can check?

      To display tweets in columns, it requires a custom template. If you really need to do that email me.

Leave a Reply

Your email address will not be published. Required fields are marked *