Simple Twitter Connect

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

Plugin: Simple Twitter Connect
Version: 0.16
Last updated: 1 year ago.
Downloaded: 126,667 times.

Download Now


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


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.


  • 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 ones for you).

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


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 support forums, so you’ll find me there as well.

Download Now



  1. I have to try SFC again. I think this is one of the best integration to use facebook as identification for WordPress Comments without using the Facebook Comments System. I’m always thinking of a OpenGraph Impementation of Facebook Comments to have all data in the own Database. But this is not on the market.

  2. […] 1. Sekarang login ke WordPress Anda dan download plugins Simple Twitter Connect di alamat ini. […]

  3. i am using plugin in my blog page, i want to use two email id for Notify, shall i use comma for contain two ids, please suggest me

  4. Hello,

    Just installed the program and created the needed api key in twitter.

    I get
    Could not connect to Twitter. Refresh the page or try again later.
    when I click the button

    I checked the system time, do you know any other reason this might not work?

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

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

  7. Hi, we’re trying to use Simple Twitter Connect and Simple Facebook Connect together. When I added STC though, login stopped working. After I tried to login once via Connect with Twitter, I always get “twitter user not recognized” now, no matter what way I try to login (facebook or normal wordpress login).

    How is the twitter login supposed to work…how do get STC to recognize that the twitter account maps to a WordPress userid? I can see in the login plugin that STC tries to get the mapping from a word press database table, but I don’t think that table ever gets updated to add the mapping :(

    I looked through the profile details for a user account, and I can’t find anyway to tell WordPress to associate the account with a Twitter account.

  8. Hi again, ok, I think I see how it works now, in general a user must first join a word press site, and then from they’re profile page, they must connect themselves to a facebook account and/or connect themselves to a twitter account. This way the can’t be associated with arbitrary accounts at either FB or twitter, and they can change it if they have to for some reason.

  9. We’ve got a few websites that we’ve made for clients who are both running wordpress and looking for more twitter functionality.

    What a great post, glad we found it!

    Thanks a bundle.

  10. I’m having an odd error where all my tweet meme’s are the same link. My Facebook meme is doing the same thing. Any ideas?

  11. Great plugin Otto! I have a question though, I notice that if I schedule a post to publish at a point in the future, even with auto-tweet turned on, it won’t automatically tweet the post once the scheduled time arrives. Is this behaviour by design?

    • No, that’s not by design, and in fact I can’t make it happen. My scheduled posts fire off the auto-tweet just fine.

      • If I comment out line 167 in stc-publish.php:

        if (empty($_POST['stc_auto_publish'])) return;

        It updates my Twitter status with a tweet when the scheduled post goes live. Looking at the code, it looks like the stc_publish_automatic() function only makes the request from the Add/Edit Post page, not when WordPress automatically moves a post from pending to publish status.

        I am only running the following plugins for Simple Twitter Connect: Simple Twitter Connect – Base, STC – Comments, STC – Publish.


  12. Was getting the following notice output from WP_DEBUG:
    Notice: Undefined index: stc-logout in /wp-content/plugins/simple-twitter-connect/stc-comments.php on line 49

    You just need to add an isset() to the if statement called on that line to fix.

  13. Hi Otto, you’ve made an excellent plugin. But, why THE HELL it worked perfectly before your latest update and now it REFUSES to tweet scheduled posts (I don’t even know if it tweets posts published by hand as I use mainly scheduled posts)? I haven’t changed the Twitter app I created nor anything on the blog.
    Why, why tweeting is always so difficult? And it happened on 2 blogs, not just one.
    I’m really upset.

  14. Quick Question How do I add a Sign into twitter button to my side bar?

  15. Hi Otto, realy like your plugin. Is there a way to tweet the content of a post, not just the title and URL?


    • well i went ahead with my own dilemma, just incase anyone else wants this small hack. It tweets the title just as before, but now adds the post content before the URL (note: under your options “Publish Tweet Text”, you must have %title% %url% for this to work). this is usefull for my short quotes on my site that I auto post every few days. The code also strips tags from the content before posting. Basically 3 lines of new code and one altered line … In stc-publish.php, on line 187 replace the function with this one:

      function stc_get_default_tweet($id) {
      $options = get_option(‘stc_options’);

      ////////////////my code////////////
      $postID = get_post($id,ARRAY_A);
      $content = $postID[‘post_content’];
      $content = strip_tags($content);
      ////////////////end of my code ////

      $link = ”;

      if (function_exists(‘wp_get_shortlink’)) {
      // use the shortlink if it’s available
      $link = wp_get_shortlink($id);

      if (empty($link)) {
      // no shortlink, try the full permalink
      $link = get_permalink($id);

      $link = apply_filters(‘stc_publish_link’, $link, $id);

      $output = $options[‘publish_text’];
      $title = str_replace(‘ ‘,’ ‘,get_the_title($id) );
      $output = str_replace(‘%title%’, $title, $output );

      ///////////// this line of code altered ////////////
      $output = str_replace(‘%url%’, $content.’ – ‘.$link, $output );

      $output = apply_filters(‘stc_publish_text’, $output, $id);

      return $output;

      Thanks for the great plugin Otto .. i hope that kinda makes sense, i’m not a real php programmer : )

  16. ok don’t laugh. I uploaded the STC, and another chat plug in. They are both on the “plug ins” list on my sites dashboard, but neither are on the “widgets” list. So how do I apply the plug ins to the page I wsant them on?

  17. How can I control which pages the tweet button appears on?

  18. Hi,

    How can I add the Twitter Login to my sidebar? After activating all the plugin+subplugins, it appears in wp-login.php but I don’t find a way to add it as a widget (maybe a feature request? STC Login Widget a la SFC Connect Widget? :D)


  19. FEATURE REQUEST: Add the ability to “Automatically Tweet on Publish” ONLY when a post matches a certain category.

    Otherwise, great plugin! Thanks!

  20. Using Simple Twitter Connect on website ( however the Sign in with Twitter button won’t show as a button, nor will the Follow Twitter Button show as a button correctly. I’m using WordPress 3.2.

  21. I cannot get either of these plugins to actually show on the site anywhere. Is there a compatibility issue with ‘Theme My Login’ or WP 3.2?

  22. I *think* I’ve got everything setup correctly but when I try to “Tweet” an old post (from the Posts page) the little loading graphic never stops turning and nothing new ever appears on my Twitter. I tried the above mention replacement of stc-publish.php but that did not help. Any help would be greatly appreciated!!

  23. I’m trying to authenticate the plugin, but every time I click on “Authorize App”, it just takes me to a page that says “Next, return to Fix My Computer and enter this PIN to complete the authorization process.” Then it gives me my pin number.

    Fix My Computer is the name of my site.

  24. Hi!

    I followed all the steps to integrate this plugin with wordpress 3.2.1 but am unable to make it work.
    When I press the button to connect it send me to the main screen of my site with the authentication chain “? Stc_oauth_start = 1 ……” but it seems that the function don’t find the action to take.
    I really want to integrate your nice plugin to my site…. so please, help me!!

    Thanks!! ;)

  25. […] CA (Gosh!TV) 7/21/2011 – Simple Twitter Connect plugin to make connecting a WordPress blog to Twitter easy. Unlike Twitter Tools and other systems, […]

  26. I am having the same problem as Jordi. I have created the app and have entered in the keys. However, when I click the button to “authorize for auto-tweeting”, it takes me to the main page of my website where some of the elements (side bar titles, etc.) are missing.

    Here is the link:

    Could you please tell us how to fix this? Thank you!

  27. Great plug-in, however it miss an important feature that Twitter Tools has, namely to add Hashtags to your WordPress to Twitter tweets.

    Would be a very much appreciated feature don’t you think?

  28. Hi! I installed your plugin and I really liked it thanks for a job. I have a small bug, when i connected with twitter in bottom where the “Send comment to twitter” appeared here such a bad shift: Thanks for your help

  29. Great plugin! I have a question for both the STC and the SFC plugins.

    Is there any way to limit the autotweet and autopublish to just posts and not pages? That would be really great.


  30. Hi.

    I’ve added your STC – Follow Button Widget plugin acivated, but it doesn’t shows the follow me.

    How can I make it to shows?

    Thanks, Ariel

  31. Hello Otto

    I hope you are well. I installed your plug in, all was seemingly well. However on the dashboard when I try to tweet my posts after seeing the connection notification between my website and Twitter, it looks like something is processing but nothing happens and no tweets. Do you know why this is?



  32. Any plans to implement Twitter’s new photo upload api?

  33. Hi Otto have you given thought to a way to share the ability to send out tweets from the dashboard to an acct shared by all the admins?

  34. Hello,

    The base plugin adds some JS (…) to every page, even if it isn’t needed. Could you please have the plugins that actually need that JS add it instead of the base plugin? I only use STC Publish, so there’s no need for adding JS on any pages outside the admin interface.


    • The JS is needed by every page for the majority of the plugins. And it makes no sense to bother excluding it on other pages, since the first time it’s loaded, the browser will cache it.

      This is the problem with Page Speed analysis tools, they only show you one page of your site, and load it as if the user has nothing in their cache. You have to analyse site speed based on the whole site, not just a slice of it.

      • I’m not worried about the speed of loading the page. I am worried about sending my users’ data to a third party unnecessarily. There’s no need to have their browsers make a request to, thereby revealing their IP etc. That and it is just… *wrong* to add JS when it isn’t needed.

        • If you don’t trust Twitter, then why are you using a Twitter integration plugin to begin with? Whole hog or none, I say.

          The whole point of the plugin is to enable the site for Twitter functionality. The Twitter @anywhere platform helps to do that, and it is needed if you’re using any of that sort of functionality. I have no way to detect in advance whether the anywhere code is *actually* needed, and if you use several of the plugins (for example, the Linkify plugin) then it is definitely needed.

          It’s not “wrong” to load unneeded JS when it adds no overhead, because the JS is already cached. It’s served from Twitter’s CDN. Hell, lots of sites use it and it’s probably already in the browser cache.

          What is definitely wrong is having code on the page that doesn’t work because you’re not loading the JS you need. Pre-mature optimization is the root of all evil, and this falls under that category. IMO, of course.

          “Sending your user’s IP”? IP Addresses are not private information. And I’m sorry, but anybody who thinks they are is paranoid. There’s enough real privacy issues on the internet today without having to invent nonsense ones.

          • While I do trust Twitter, I can’t decide for my visitors what sites they should be trusting. I’m perfectly happy to have it loaded where it is needed – in the admin panel, in this case. The various plugins should be adding the required JS where it is required, rather than everywhere. That’s just good software design.

            • That’s your opinion. I disagree.

              Regardless, I’m not changing the plugin. The majority of users want more than just one function to work, and adding extra code to detect when and where to add the JS, when it fundamentally doesn’t matter, is silly. IMO.

              Feel free to use a different plugin.

  35. Hello Otto.

    Very nice plugin (and the Facebook one too !).
    Still I have a “refesh” issue I think. When I try to login to Twitter in an article page (in order to comment), I’m effectively logged but nothing has changed. I don’t have the standard Avatar + You are connected with your twitter account. I just have usual blank fields like it’s a standard visitor.

    I’m using WordPress 3.2.1 and the latest version of your plugin.
    Is there solutions to this problem ?

    Thanks a lot in advance :)

  36. Hi Otto, I am completely new to the whole concept of website design. I got the plugin working on our site, but the button is not completely visible. It gets “cut off”. Could it be because of the long “@sweepingtheusa” or is there a way to fix this without me getting too overly frustrated (again)?
    Thank you.

  37. Hi Otto,

    I had an issue authenticating STC-Publish with twitter. Realized my server had bad time. So I am leaving this as a note in case anyone else runs into it.

    In the STC admin page, I check “Automatically Tweet on Publish”. I then click on the link for “Authenticate for auto-tweeting” but twitter gives me this:

    “Woah there!
    This page is no longer valid. It looks like someone already used the token information you provided. Please return to the site that sent you to this page and try again … it was probably an honest mistake.”

    Make sure the server hosting your wordpress site has correct time. Force sync it to a time server if need be and try again. Fixed it for me.

  38. Hi Otto,

    Thanks for the plugin! Recently our follower box has started to expand height-wise and only show followers in one column. Any suggestions for how I can fix this? I’m not even sure what the problem would be (i.e., fix the height of the box). Thanks for any help

  39. Hi Otto,
    I am having some trouble with the autotweeting.
    When I click the button Authenticate for auto-tweeting it sends me to a twitter authorize page where it gives me a pin number and says “Next, return to now24 enter this PIN to complete the authorization process:”
    (now24 is the name of my site and my twitter application and my twitter account)

    Any idea where I am supposed to enter this pin?
    In the plugin?
    In my site?
    In my twitter account?
    In my twitter application?

    Thanks in advance.

    • You failed to follow the instructions. Go back to the Twitter Application, edit it, and change the type of the application to “Browser” instead of “Client”.

      • Thanks Otto,
        I got confused because twitter changed their UI.
        There is no “Browser” or “Client” now.
        You have to enter a callback url ( for your application.
        Everything is ok now.
        I am using your plugins for about four months now and my twitter application is that old.
        It was set to “browser” and everything worked fine until they changed the UI.
        I thought I post this information in case someone else has a similar problem.

        Thanks again for the AWESOME plugins!!!

        • Ugh, they changed it again?

          Regardless, the plugin’s instructions give you the proper value for the callback too. You can find it in the Help dropdown as well (upper right corner of the plugin’s settings screen).

          • I know but twitter couldn’t save the callback url field.
            Tried to enter and save with firefox, chrome and opera, still couldn’t save the field.
            And don’t forget that this is not a new application, it is four months old.
            And it was set correct.
            Seems that they fixed it now though.
            Here is a quote:
            “Actually, we ended up just changing the UI with the relaunch so that this is no longer an explicit setting. In fact, as long as you specify a callback URL (which you do in the “Settings” tab of “My applications”), then you’ve implicitly set your application type as browser. Even if you’re callback URL is just a placeholder.”

  40. Everything is working fine, there seems to be no problem.

    But i have this error report when debuging php:

    “Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/now24/public_html/wp-content/plugins/google-analytics-dashboard/gad-admin-dashboard.php:29) in /home/now24/public_html/wp-content/plugins/simple-twitter-connect/stc.php on line 33″

    do you have any advice?

  41. Hi Otto,

    I am using both your STC and SFC plugins and have them configured to auto-tweet and auto-publish. They both do so successfully. Recently I started using a 3rd party program in which I write my blog posts. This 3rd part program sends the posts to my WP blog using the XML-RPC interface for remote publishing.

    Now when I write a post in the 3rd party software, it goes into WP successfully and gets auto-published on my facebook page using SFC. However, it does not get auto-tweeted. I can log into my wordpress backend, edit the blog post, and push it to twitter from there but it is not happening automatically.

    If, however, I add my blog post directly into the WP backend (not using the XMLRPC), then STC will auto-tweet it.

    I’m an old C programmer and without digging into the code it almost seems like the STC plugin is not connecting to the same event handler as the SFC plugin. Of course, I am saying this without looking at any of the code but rather a guess based on behavior. I’d be more then happy to help debug this if needed.

  42. Hey I got these errors:
    Warning: session_start() [function.session-start]: open(/tmp/sess_58538fca420cb86321600cbb0440078c, O_RDWR) failed: Permission denied (13) in /*/wp-content/plugins/simple-twitter-connect/stc.php on line 33

    Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /*/wp-content/plugins/simple-twitter-connect/stc.php:33) in /www/htdocs/w00d4710/wp2011/wp-content/plugins/simple-twitter-connect/stc.php on line 33

    Warning: Unknown: open(/tmp/sess_58538fca420cb86321600cbb0440078c, O_RDWR) failed: Permission denied (13) in Unknown on line 0

    Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

    I don´t have these errors, if I use “AddHandler php53-cgi .php” in my .htaccess ….
    But then I have the problem to save new edits in the Menu of my WP-Theme. If I delete “AddHandler php53-cgi .php” in my .htaccess then everything works fine with the Menu.
    My provider says, I don´t need any add handler in my .htaccess, because their servers use php5!
    I use the latest WP 3.2.1

    Do I have to use a different addhandler?

    thx for reply, atze

  43. Hey Otto, Thanx for the plugz.. By chance you know how I can prevent the Icons being featured on my homepage? Would help a lot!

  44. Hi,

    Great plugin! One thing on wishlist though – inbuilt captcha for comments.

    Added it, but hitting ‘comment’ meant captcha (SI Captcha) failed. Disabled that plugin and it worked.

    Hope this makes sense,


  45. Hi, looks like a great plugin, however in the base plugin settings I have the message “Twitter Status
    RSS Error: WP HTTP Error: Too many redirects.”

    And while the login option is shown it does not work

    any thoughts?

    • The Twitter status feed doesn’t have any redirects. So most likely, your webserver is configured to not allow outside HTTP connections.

      Meaning that no, the plugin won’t work, and until you can change the server to allow outgoing HTTP, it’s not going to work. At all.

  46. exactly what i was looking for….really great share..thank you for sharing

  47. If any option to retrieve user email id on twitter connect….Now i got User id,User Name and screen name..Any other option to retrieve email id..kindly suggestion or idea.


Leave a Reply

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.