Simple Twitter Connect

( Hey, if you like STC, why not check out Simple Facebook Connect too? )

Plugin: Simple Twitter Connect
Version: 0.15
Last updated: 100 days ago.
Downloaded: 74,835 times.

Download Now

Overview

Following the same pattern as the Simple Facebook Connect plugin, this is a plugin to make connecting a WordPress blog to Twitter easy.

Unlike Twitter Tools and other systems, this plugin uses Twitter’s latest authentication mechanisms. No putting in Twitter names or passwords. Clicking the Connect with Twitter button will redirect a user to Twitter for approval, then bring them back to where they came from, only now with their Twitter credentials available for use. Sub-plugins can then make any use of this they like.

Note: This is fully compatible with Simple Facebook Connect, and can even run at the same time as it. Naturally. :)

Requirements

Currently, WordPress 2.9 or higher and PHP 5. I don’t write code for older versions of WordPress, or obsolete versions of PHP. Sorry.

Features

  • Easy to install and use.
  • Modular. Only use the pieces you want to use.
  • Integrates easily into any theme.
  • Simple control panel, only has the options you need for the pieces you activate.
  • Secure. Uses the latest WordPress coding techniques to eliminate tricky security problems.

Current sub-modules

  • Login using Twitter Credentials
  • Comment using Twitter credentials
  • Users can auto-tweet their comments
  • Tweet button
  • Tweetmeme button
  • Auto-tweet new posts to an account
  • Manual post tweeting
  • Full @anywhere support
  • Auto-link all twitter names on the site

Future sub-modules

  • Pull tweets back in as posts
  • (whatever you like, send me suggestions!)

Installation Instructions

  1. Upload the files to the `/wp-content/plugins/simple-twitter-connect/` directory.
  2. Activate the base plugin through the ‘Plugins’ menu in WordPress.
  3. Configure Twitter for your site by following the instructions on the Settings screen.
  4. Activate the sub plugins you want to use through the ‘Plugins’ menu in WordPress and configure them appropriately. Some require no configuration at all, some require minor theme changes.

Shortlink note

There’s too darned many shortlink systems out in the world. So, this plugin does not implement shortlinks at all.

Instead, it relies on the new Shortlinks API in WordPress 3.0. Unfortunately, this means that if you’re not running WP 3.0, you won’t see shortlinks appear in your tweets (although Twitter might turn some normal links into bit.ly ones for you).

My advice: Be patient. 3.0 will be released eventually.

Licensing

This plugin is licensed under the GPL Version 2 only.

Method to get support

You can email me directly, however I am also a moderator at the WordPress.org support forums, so you’ll find me there as well.

Download Now

 

738 Comments

  1. says:

    Hi Otto. Firstly, congratulations for this amazing plugin!

    I’ve installed STC and SFC on my site today ( http://mynextzone.com ) and some things doesn’t ran how expected.

    On STC, my visitors can’t have the option for logout from Twitter or send their comments for your Twitter accounts. On SFC, the “comment-share-window” shows one post different that the person had commented. How can I solve these 3 problems?

    Thanks!

  2. Can someone help me…I still can’t get twitter to post articles…I have checked oauth it is correct…I have checked STC publish settings they are correct…can someone help me…

  3. titi says:

    I Can’t tweet to the account defined. I always have to login when I click to “Tweet” in the article (admin).

    Even if have in options of STC :

    Currently logged in as: ***username***
    Autotweet set to Twitter User: ***username***

    oAuth is not here for that? …

  4. tina says:

    Hi…

    i have the same problem as Titi !

    Just a other problem too. In the Tweet field on Artikel site, the %url% does not work.

    If i mark Autotweet, then the Permalink does not publish in Twitter.

  5. tina says:

    I must change my Hoster ! Strato sucks !

  6. Patrick says:

    The logout button doesn’t seem to work for me – it always keeps me logged in. I have to clear out all my cookies in order for it to work.

  7. would be the correct code to include the stcmeme button in my theme?

  8. Richard says:

    I’ve been trying in vain to get STC working. I have SFC working no problem and I thank you for that Otto. Before I go on, I’m using the latest version STC with WP2.9.2.

    My problem with STC is that on the comment form when login in, the user gets authenticated seemingly OK and then redirected back to my page, but the comment form is the same – no acknowledgment that login was successful. I am able to login successfully on the admin screen but not as I said in the comment box. Everything else about the plugin appears fine. Auto-tweets upon posting, tweeting from the dashboard… just this one issue. If you could help (and I do realize you don’t have to but it would be appreciated.

  9. says:

    Hi,
    The STC Followers Widget does not display any follower on my website (I use WP 3.01). I saw that STC-publish settings must be set to an user, but I don’t know how to do it : my STC-publish settings display “Autotweet not set to a Twitter user”.

    I tried “Authenticate for auto-tweeting”, but I only get an error message “Access Forbidden”.

    I’ve tried to create a new Twitter API, but nothing changed. Is there a particular setting to choose when I create the API ? (I’ve put “Yes, use Twitter for login”)

    (Note : when I edit a post, the “Twitter publisher – Tweet This” works).

    What can I do to set the autotweet user ?

    My website is http://www.bourgogne365.com (the widget is on the right sidebar).

    Thanks a lot
    Cyril

  10. says:

    @titi and @tina: Deactivate any other twitter related plugins. I was using Twitter Stream and having the same problem, and after deactivating the plugin, everything worked as expected again.

    @Otto: A solution for this might be to either wrap the classes in a conditional to see if they’re already declared (the debug notices were all regarding redeclaration of classes), or to prefix the classes. Of course, the other option is to rename the directory to ’000aaa-simple-twitter-connect’. ;)

    Of course, the other option is that I could build a sub-plugin with Twitter Stream’s functionality and give it to you to include. :D I guess we’ll see how much time I have… The main draw of Twitter Stream is that it caches the results…

  11. Can someone help me… I still can’t get twitter to post articles … Does anybody help me please.

  12. I am agree with joan bloach this plugin is a great plugin for twitter.

  13. mensajes claro says:

    A solution for this might be to either wrap the classes in a conditional to see if they’re already declared

  14. A solution for this might be to either wrap the classes in a conditional to see if they’re already declared try it and fixed it.

  15. [...] así como esta broma le simulan y le hacen creer que es un espejo real cuando no lo es [...]

  16. this might be to either wrap the classes in a conditional to see

  17. [...] The Deadline For CommentsAtom Default FeedGravatar BoxPHP Code WidgetSimple Facebook ConnectSimple Twitter ConnectUnicornifyNothing to See Here « WordCamp Birmingham 2010 [...]

  18. I was using Twitter Stream and having the same problem , But this works so fine.

  19. it does not recognize the tweet. This is strange because when I click the button everything works, the message is published on the twitter counter goes from 0 to 1. But as I update the page the counter is reset to 0

  20. says:

    Hi Otto, I’m having problems with authenticating my Twitter account for auto-tweeting. Each time I try I get this error message:

    Fatal error: Cannot redeclare class OAuthSignatureMethod_HMAC_SHA1 in /home/myfolder/public_html/mydomain/wp-content/plugins/simple-twitter-connect/OAuth.php on line 82

    Any idea how I can authenticate my account? Thanks.

    • says:

      You have some other plugin that is conflicting and loading OAuth as well. You’ll have to disable that other plugin.

      • says:

        Thanks Otto.

        It was YOURLS. Disabled it and everything is good.

        • says:

          Hmmm.. I’m using YOURLS on this site without any problem. If you disable the twitter posting features in YOURLS, it should work fine.

          • says:

            Thanks Otto, that *seems* to be working now.

            BTW I just tried to ‘Sign in with Twitter’ to send this reply and got the same thing here:

            Fatal error: Cannot redeclare class OAuthSignatureMethod_HMAC_SHA1 in /home/content/o/t/t/otto42/html/wp-content/plugins/simple-twitter-connect/OAuth.php on line 82

          • says:

            Twitter is working now on this blog. I just used it to sign in and leave this comment. :)

            Turns out that YOURLS does cause a plugin conflict. There is an easy fix though. Edit the YOURLS plugin.php file and find this line:

            add_action('init', 'wp_ozh_yourls_init', 1 );

            Comment it out, then don’t use the Twitter features of YOURLS.

            • says:

              Ugh. Turns out that actually breaks the YOURLS code. Instead, I edited the inc/core.php file and commented this code out:

              	// check for OAuth requests on plugin load.
              	if( isset($_GET['oauth_start']) ) {
              		require_once( dirname(__FILE__).'/oauth.php' );
              		wp_ozh_yourls_oauth_start();
              	}
              	if( isset($_GET['oauth_token']) ) {
              		require_once( dirname(__FILE__).'/oauth.php' );
              		wp_ozh_yourls_oauth_confirm();
              	}
              

              THAT worked, finally. Now it does shortlinks without any of the twitter stuff breaking everything.

  21. says:

    Hmmm, tried that. Now when I try to sign in with Twitter it doesn’t redirect I just get an error message ‘ERROR: Twitter user not recognized.’

  22. says:

    Quick question on the STC Twitter Followers List widget. Is that supposed to show pics by default as your sidebar does? I’ve never seen pics. I do get a count of followers, but that’s it.

    Today I upgraded to the newest release of STC, and the same widget no has some errors for me, followed by the count.
    Following Us
    Warning: shuffle() expects parameter 1 to be array, object given in /home/content/r/v/o/rvoodoo/html/empire/wp-content/plugins/simple-twitter-connect/stc-followers.php on line 135

    Warning: array_slice() expects parameter 1 to be array, object given in /home/content/r/v/o/rvoodoo/html/empire/wp-content/plugins/simple-twitter-connect/stc-followers.php on line 136

    Warning: Invalid argument supplied for foreach() in /home/content/r/v/o/rvoodoo/html/empire/wp-content/plugins/simple-twitter-connect/stc-followers.php on line 144
    RVoodoo on Twitter70 Followers

    Any ideas what’s to blame here?

  23. says:

    I updated the STC plugin 3 days ago and ever since I am getting + sign instead of ‘space’ while tweeting via the Tweet button.

  24. Colin says:

    Please forgive me if this is posted somewhere obvious, but I am not seeing it. How can I post the sign in button on my sidebar?

  25. says:

    I’m using both Simple Facebook Connect and Simple Twitter Connect. (1) I would like the Facebook share button and the Tweet button (both set to display after the post) to be vertically lined up with each other. Right now the Tweet button is sitting up higher. (2) How would I move the buttons to the right side of the page?

  26. says:

    Hey Otto,

    Thanks for some really cool plugins! :)

    Here’s a suggestion: How about adding in a feature where you hide part of a post using a tag or tags, and tweeting the post will unlock the rest of it for the reader, where he/she then gets some promised content or a download of sorts etc. And perhaps you could do the same with SFC, and even combine the two so a visitor could choose which to use – or could use both?

  27. Hi! I’m using Simple Twitter Connect on my website. I encountered a trouble with showing Twitter Followers List (STC) widget, you can see this here: http://yfrog.com/nesimpetwittererrorp
    or visit my site: http://www.askguyonline.com. Please help me to fix this problem. Thanks.

    I also use Simple Facebook Connect, and there’s a problem, too. I can’t make Facebook Like button appears on both Before and After the post. This “Facebook Like” button can appear correctly after OR before (as you can see in any single post in my site) the post, but NOT both. When I tried to set this button appears on both position, my Facebook Fanpage box widget just crash and show nothing. Does this plugin conflict with any others?

    I want to add Facebook Like button to my Homepage. You can see I have a short-summary of each post on my main site (http://www.askguyonline.com). Please tell my if there’s a way to add a Like button this brief.

    You’re doing great jobs! Thank you so much.

    Nguyen Hoang Long

  28. says:

    Was just wondering if there was a way to exclude a category from auto-tweet? I have a few hockey rss feeds that auto post to my site with feedwordpress always in the same category. Was wondering if there was a way to exclude that category?

    Thanks again! Great plugins here!

    • says:

      Well, not sure if there is a better way to do it, but this works for me! Just include whatever you want excluded from autopost (post_type, cat, etc) in the stc_publish plugin
      Under This:
      // check to make sure post is published
      if ($post->post_status !== ‘publish’) return;
      I put this:
      if ($post->cat == 464) return;
      Works for me, so good enough, unless there is a better way!

  29. tina says:

    Hi…

    @John Bloch
    Thanks, now it works fine :-)

  30. xiabolai says:

    Hi Otto, Love the plugins! Having odd issue with STC Comments. Once logged in to make comments on my site with STC Comments, user cannot logout. Keep clicking the logout button, but it just keeps refreshing the page and user is still logged in with Twitter.

    Any ideas? Thanks!

  31. says:

    Having problems loggin out of STC. Please respond with a fix. Thank You.

  32. says:

    Wow. comment on twitter does work (for you). But I can’t get it to work for my wife’s site at http://www.annamoran.com. The button works, then asks me to allow the application to be used on my Twitter account. After saying yes, it redirects back to Anna’s site, but it’s as though the step never happened (unlike here).
    She’s using “The Morning After” by Woo Themes. She also has the Simple Facebook Connect comment button on it that doesn’t work as well (I am unsure which parts on the Comment code I should edit). Can you help us out?

  33. titi says:

    Hi,

    The button style (horizontal / veritcal) with count, doesn’t seem to appear in Chrome. Firefox is Ok.

    I copy/past the url in iframe directly in my adress bar, and I think the problem is from twitter.

  34. says:

    First of all, I just say many thanks for your efforts to make this plugin. I have tried many Twitter plugins and got failed result. Your plugin is running well in all of my blogs and easy to connect to Twitter, Oauth is OK.

    In the other case in one of my blogs with HeatMap Theme…. I got a blank page in Simple Twitter setting, no option at there.. hxxp://www.blabla.com/wp-admin/options-general.php?page=stc

    I’ve changed CHMOD and still got same problem… May you suggest an idea to solve this problem…???

    Thanks and GBU

  35. Chux says:

    Thanks for this very nice plugin!
    I wanted the tweets to contain the name of the author publishing a post so I put these lines in the stc_get_default_tweet function in my stc-publish.php. Dont know if it’s a good way to do it.

    global $wpdb;
    $author_name = $wpdb->get_var($wpdb->prepare("SELECT user_nicename FROM wp_posts, wp_users WHERE wp_posts.ID=$id AND wp_users.ID = wp_posts.post_author LIMIT 1;"));
    $output = str_replace('%author%', $author_name, $output );

    Maybe helpful for someone :)

  36. Stefano says:

    i ve got the same problem of OSUKI. wordpress 2.9 After insallation SETTING PAGE is blank
    any help?

  37. says:

    Hi Otto,

    at first: Great works! I’mm using your Plugin on many different sites.

    But Twitter seemed to change the API. After I tried to “sign in with twitter”, Twitter gives me a pin which I have to enter on my site.

    Greetings,

    Sven

  38. [...] Simple Twitter Connect is a series of plugins that let you add any sort of Twitter functionality you like to a WordPress blog. [...]

  39. STB says:

    Hi Otto,

    First of all a big thank you for making this great plugin and for sharing it with the community!

    Would you consider making STC/SFC support multiple users? Such as that different editors/authors on the WordPress blog could each have their own Twitter/Facebook account connected to their posts.

    • says:

      The Login plugins do that right now. Look on the Users->Your Profile screen.

      • STB says:

        Thanks a lot for the immediate reply.. and sorry for not looking well enough.

        Explaining where I went wrong. Not to criticize but possibly might help increasing the user experience in further development. Where I went wrong was .. I only saw the option to enter credentials for 1 user (after activating your plugin) which lead me to believe it didn’t support multi-users. I *should* have looked a bit further before asking .. but anyway .. just sharing my experience. Might want to put it in the list of features or mention it somewhere else. Do with it as you deem best. :)

        And .. having said that .. yes all the options I wished for are there .. your plugin is really amazing Otto! Thanks very much again.

  40. conualfy says:

    Hello!

    I just found the 2 plugins you wrote for using Facebook/Twitter to comment and I plan to use them on my traveling blog.

    I have a problem with all websites using Facebook / Twitter share count, as when their servers are very slow / down, blogs using their API are not loading. It just happened to your blog. I had to reload ~10 times, just hoping static.* Facebook server will work.

    Do you see any solution to these problems?

  41. says:

    Hi–

    The twitter plugin was working great until a couple of days ago. Now all I get is the twitter box on my admin page after the post WITHOUT the box which shows the message that will be tweeted.

    I did the upgrade and haven’t added any new plugins. Any suggestions?

  42. Jason says:

    I’m having the same problem as Stefano and OSUKI. I’ve tried to use it on 2 different sites running 2.9. Try to set it up and the settings page is simply blank. Tried uninstall and reinstall and no luck. Any help for the 3 of us?

  43. says:

    First off I’d like to say thinks for making this great plugin, along with the facebook connect plugin.
    They are really awesome plugins and when I get my paycheck next month I’d like to donate.

    But I do have a question…

    I was wondering if there was any way of taking the buttons that are created in the edit user page for connecting STC and SFC for an existing account, and putting them on a page that is not in the admin area. I have a simple edit profile page I’m using instead of users going into the admin area to edit their accounts. I’d like it to show exactly how it does in the edit user profile page just would like it to be called in a different location in the front end.

    Thanks a lot!

  44. Still having this problem:

    “Hello,

    We’re working on a beta site and have installed your plugin — it’s great! — but we’re having trouble with the post excerpt showing “Tweet” in plain text before each excerpt? Any solutions?”

    They’re ready to riot on me at the office about this! Any help would be great :)

  45. About STC – TweetMeme Button I’d like to choice the final position (e.g. top right). I’ve also a facebook shareware button

    Fabrizio

  46. DarkFish says:

    I like this plug=in for its simplicity! Kudus!
    How do i deactivate the Simple Twitter Connect plug-in twitter authentication process since another application on my website has already done so.
    Or is there a code i can add to the plug-in to check if twitter is already authenticated. If so do not re-activate because each time i try to comment via twitter sign in with twitter, I get an error message that says cannot redeclare classes. I have try removing various classes but still comes back with new ones (class error) that cannot be redeclared.

    Please any help will be appreciated.
    Cheers

  47. dstryker says:

    Otto,

    I have been having issues with the twitter followers list plugin. It gives me the following error on my 2 web sites.

    Warning: shuffle() expects parameter 1 to be array, object given in /hermes/bosweb/web247/b2470/ipw.strykero/public_html/wordpress/wp-content/plugins/simple-twitter-connect/stc-followers.php on line 135

    also line 136 & 144

    any suggestions?

    Thanks

  48. Roar says:

    No matter what I do or what other plugins I disable, it still does not allow the users to log out.

    Grrrrrrrrrrr.

    I disabled everything twitter related.

    Otto, can you please respond to this?

  49. says:

    I would like the same type of connect widget for the Twitter connect as the Facebook one.

Leave a Reply

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

Connect with Facebook

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Need to post PHP code? Wrap it in [php] and [/php] tags.