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

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

 

793 Comments

  1. Building my first wordpress blog… installed STC however won’t post to my twitter account.
    On the settings page for STC is says:
    “Twitter Status
    RSS Error: WP HTTP Error: Too many redirects”
    I deactivated all other plugins and left STC running to see what happened and still no luck!
    Thoughts?

  2. When I am at the fromtpage or in a post, tweet button doesn’t appear. If I refresh with F5 then the button appears!

    Source code says ther’s only an href before refresh (something like: )

    Source code after refresh (when tweet button shows OK) shows an iframe

    something like:

    Need help please!

    Thanks

  3. In Opera browser:

    When I am at the fromtpage or in a post, tweet button doesn’t appear. If I refresh with F5 then the button appears!

    Source code says ther’s only an href before refresh (something like: )

    Source code after refresh (when tweet button shows OK) shows an iframe

    something like:

    Need help please!

    Thanks

  4. Hello Otto,

    It’s me again with the Haiku poems…
    Is there a way to transport the -content- to Twitter as well?

    content usually is:

    Blabla blabla blah
    Blabla bla blablah bla bla
    Blah bla blabla blah

    Best regards,

    Piotr

  5. Hi, I’ve a problem with some character in auto-tweet.

    If I use the ‘ symbol STC publish ’

    How can I solve this issue? Thank you.

  6. Neat! I like how we have the choice of the two!!

  7. The tweet box from the dashboard never ends up tweeting, just sits there with an continuous loading circle thing

  8. Trying to authorize the app, but Twitter provides me a PIN number and I don’t know what to do with it… App / STC won’t work without this authorization… Any ideas?

  9. how i set to apear the loging botton on from page.??

  10. Hi Otto, your plugin is fantastic, however it’s not compatible with eshop plugin.
    Is that possible to make them both compatible each and other?
    One more, how to allow user registration only via FB connect? I want to disable default wordpress registration feature, so that every user only can register to the site using their FB account. Is that possible?

    Thanks for your advices.

  11. Hey there, both this and the FB plugin are great. A small question though:

    We use a WP template for our non-profit website, and the front page is populated by either pages or posts, in our case, pages. I am wondering if there is a way to limit the automatically assigned buttons to blog posts, while not adding them to pages – make sense? Having the automatic functionality is important, as we have various volunteers blogging, some more WP saavy than others, so asking them all to add in the buttons manually is not likely to be successful.

    Thanks!

    Tyson

  12. I have been struggling with STC for a while now, and I can’t figure out what’s going on, which is frustrating because SFC has been nothing but smooth sailing!

    If I’m logged in to more than one WP site (standalone, not Multi) I get stuck in a scenario where each site wants me to authenticate to the different Twitter accounts, and that’s each time I try to do something that will be Tweeted out.

    I could end up logging into 2 or 3 Twitter accounts 3-4 times each, and no amount of choosing callbacks or anything will save that info to each site so that I don’t have to do it each time I login.

    Is this normal behavior, or have I missed a key step?

    • With the way Twitter works, it can’t handle multiple logins well. This isn’t a problem for most. My advice would be to tie all your logins to the same Twitter account.

      • Well, shoot. That was the great part about WordTwit, before it broke… it did exactly as I described. I could just set it up on several different sites, and logged in or not, it would auto-tweet whichever categories I wanted, even scheduled posts.

        But WordTwit stopped working for new installs about 6 months ago (for some strange reason, installs set up before then still work, even after a WP upgrade). So while I have 4-5 sites that still work, I can’t set up several new sites with WordTwit as I’d intended.

        And you’re saying that STC can’t function like WordTwit, with each site being authenticated to its own Twitter account and automatically tweeting out posts without requiring me to actually login to Twitter.

        Disappointing, because I still have to keep looking for something that will auto-tweet posts without being babysat or manually Tweeting all the time. My only other alternative is to set up each Twitter account to read RSS feeds from their respective sites. More time consuming, and smallest interval I can set it to check is hourly.

        Ah well… at least SFC performs above and beyond ;)

        • No, you can indeed authenticate each site to its own Twitter account, for automatic publishing. Not for login though, because you cannot actually be logged into more than one Twitter account at a time.

          The STC-Publish plugin has a button to let you authenticate to the site for auto-publishing. But not for login and not for manual publishing.

          • Then I am missing something, because the authentication and settings for STC-Publish aren’t being saved.

            I don’t need login, and if auto tweet will work, I can live without manual tweeting. Time to poke around some more!

          • The reason I installed this plugin was for the login feature and seeing as it had or at least I thought it had auto-tweeting I disabled Twitter-Tools which works with Scheduled posting. If you write something and Scheduled it, it will tweet it when its published. I disabled Twitter-Tools after installing this because I believed they would have a conflixed. Plus Twitter Tools also lets you send any tweet form a page like the dashboard deal does.

            Today.. my post did not auto-tweet on Scheduled. Even know the button to auto-tweet was checked and I’m login to the account. Also every time I go to tweet it asked me to allow the app on my twitter account. That is annoying.. I might have to disabled everything on this plugin and just use it for the login and nothing more.

            What a shame, given I really liked the whole all in one opinions it gave. But from reading these comments above, I understand that it wont tweet unless I hit the publish button, which is a no go for me. I tend to write weeks ahead and leave post to be posted by Scheduled.

  13. When trying to activate followers I get this URL
    plugins.php?action=activate&plugin=simple-twitter-connect%2Fstc-followers.php&plugin_status=inactive&paged=1&s&_wpnonce=

    simple-twitter-connect%2Fstc-followers.php with %2F instead on – , and no way to install it changing manually the URL, any idea?

    Thanks

  14. A exellent plugin. Does the twitter connect work the same way for user signups?
    If I get twitter connect and FB connect to work well on the user signups I will defetly by you a beer Otto:)

  15. Hi Otto – thanks for a great plugin. Is it possible to send a tweet from my WordPress PHP using a function in STC?

    • Not easily, no. I didn’t abstract that out. This function will do it though, if you have enabled the automatic-publishing feature. I’ll include it in the next version of the publish plugin.

      function stc_publish_send_tweet($status) {
      	$options = get_option('stc_options');
      	$args=array();
      	$args['status'] = $status;
      	$args['acc_token'] = $options['autotweet_token'];
      	$args['acc_secret'] = $options['autotweet_secret'];	
      	$args = apply_filters('stc_publish_send_tweet', $args );
      	$resp = stc_do_request('ht'.'tp://api.twitter.com/1/statuses/update',$args);
      }
      
  16. Hi Otto. Just wondering is there anyway to get the Twitter Publisher box to show up on custom post types.

    Thanks for all your work for the WordPress community!

  17. Easy now!
    I was looking for an OGP plugin and as I searched onwards I came across a comment for another plugin recommending your SFC one, so, I tried it and I loved it. Loved it so much, I plugged in the STC one aswell.

    Working the two together I’ve noticed a couple of things:
    1. Dimensions for different size ‘Like’ buttons as seen here are not an option; https://developers.facebook.com/docs/reference/plugins/like/
    I amended them in the like.php file as I saw fit and..
    2. One pixel out! ONE PIXEL! Then the two buttons for each off the plugins will sit harmoniously together but I’ve not figured out how to do it manually yet.

    All in all, EXCELLENT work. When I’ve money, I will donate..

  18. Hi Otto,
    Great plugin. Quick question. When twitter comments are pulled in to wordpress, the twitter avatars don’t show on the site, only on the backend. Is there a way to fix that?

    Thanks!

  19. great plugin

  20. Good day Otto,

    I got a error when i clicked on “Sign in with Twitter”
    then it says “ERROR: Twitter user not recognized.”

    may I know what i missed?

  21. otto,
    i’m using the sitewide tags plugins to populate my main blog (http://interbarney.com/). so i modified the stc_get_default_tweet function to get the url from the “permalink” custom field:

    function stc_get_default_tweet($id) {
    	$options = get_option('stc_options');
    	$customurl = get_post_meta($id, 'permalink', $single = true);
    	$link = '';
    	
    	if (function_exists('wp_get_shortlink')) {
    		// use the shortlink if it's available
    		$link = wp_get_shortlink($id);
    	}
    	
    	if( ( $customurl ) ) {
    		// use the permalink from custom field
    		$link = $customurl;
    	}
    	
    	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 );
    	$output = str_replace('%url%', $link, $output );
    
    	$output = apply_filters('stc_publish_text', $output, $id);
    
    	return $output;
    }
    

    i’m not a php expert, i don’t know if this is the correct way to do it, but it’s working. maybe you could improve it and add it to a future version.

  22. I’m only using the STC-Comment plugin right now… Layout, login, and comments works swimmingly but “Send Comment to Twitter” functionality doesn’t work for me. Any ideas why?

  23. otto, forget what i’ve said before. i hadn’t noticed that i could filter the link (and i did the same thing on sfc)

  24. Hi, i like you plug-in, sure is very simple to apply. I only have problem with yahoo, but because yahoo, not you plug-in. So, It is possible to translate for Brazil Portuguese? I can help in this, then, tel me how to.
    Congratulation!

  25. How do I manually add Twitter login to my custom login page?

  26. I am trying to get my wordpress app authorised and i keep getting this

    Your access token

    It looks like you haven’t authorized this application for your own Twitter account yet. For your convenience, we give you the opportunity to create your OAuth access token here, so you can start signing your requests right away. The access token generated will reflect your application’s current permission level.

    I have clicked create access token it says created but i can’t find it?

  27. when i put the details into wordpress it says connection failed to authenticate please check your keys and i ahve copied and pasted them as well as typed them in manually and it can not seem to connect to twitter

  28. Hello, I get the following error after clicking on Authenticate for auto-tweeting under publish settings: Fatal error: Cannot redeclare class OAuthSignatureMethod_HMAC_SHA1 in /var/www/vhosts/ruinerwold.info/httpdocs/wp-content/plugins/simple-twitter-connect/OAuth.php on line 82

    Does anybody know how to fix it. (I want to auto post to Twitter)

  29. Hi Otto,

    First off, thanks for the great plugins. I appreciate how structured your PHP is. I was actually able to modify an older version to support custom post types before you integrated that feature. Anyhow, I’ve got a problem that I believe is related to Twitter using “t.co” wrapping for URLs. I am using STC core and STC Publish to send the title and URL from my websites to Twitter. Now the URL is just displayed as plain text.

    You can see an example of the problem at https://twitter.com/#!/ArizonaAlarms

    Can you give me some advice as to where/how to fix this problem?

    Thanks in advance and have a great day!

    Josh Johnloz

  30. Awesome plugin! I’m using this one and your Simple Facebook Connect. Love it! & love the option for the short code – makes it great to just have it on certain pages!

  31. Hi Otto,

    thank you for your excellent plugins STC and SFC. imho they are the best plugins for connecting to social networks for WordPress.

    Strangely enough, I’m experiencing problems with the publishing modules. Some of my special characters are not submitted/accepted correctly. Instead of a Twitter message like New article: Hot stuff for wordpress: Automatic writing - in thirty languages it produces something like New article: Hot stuff for wordpress: Automatic writing – in thirty languages</code. Some punctuation marks don't seem to work. The error is in STC and SFC. I think, it's not a direct plugin problem, somehow the title isn't submitted in the right format (code?) to the publish plugins ... but where and how can I can that?

  32. Hi Otto! You’ve made a very great job! Congrats! But… I’ve that same problem with SFC. Each time the plugin auto publish on Facebook, the post title or Event title is transformed on Facebook:

    example of post title:

    Joe & John
    transform to:
    Joe & John
    on Facebook!!

    There is a place in the code I can Edit so it solves the problem?
    Thanks!

  33. Hi Otto
    Awesome plugin. Thank you very much!
    I get one strange wrong behaviour though.

    When someone clicks LIKE for a post, It shares on his wall but the Image is actually the “sign in with twitter” image. Strange, isn’t it? Default IMG in SFC settings is set to something else, it doesn’t do the trick … do you have an idea?

    thanks!!

  34. How to fix
    RSS Error: WP HTTP Error: malformed

  35. Hello.
    I love your plugin but have since come into a little problem. I recently had twitter suspend my account for reasons unknown (still trying to fight it. Had 27K followers and obviouslt wont let it go without a fight). I have since started another account and am trying to use the sign in the twitter and am having problems with connecting to the new account.

    Any help you can provide would be great!
    Thanks so much for your time
    Gerry

  36. Hi. I just installed this plugin. I have entered the Consumer Key and Secret. My app is set with the proper callback URL is is set to Read & Write.

    However, I do not see any settings for the plugin. All I see are the Main Settings, where I can enter the key & secret and choose the icon style. Nothing I do appears to enable more settings.

    In case it is relevant, on the right side, the Twitter Status waits for a while, and then reports:
    RSS Error: WP HTTP Error: connect() timed out!
    has been doing that all morning.

  37. Hello Otto,

    First, I want to thank you for your work;
    I’m also using your plugins (Facebook and Twitter) for my blog.

    But the Twitter-button kept delaying the page. I started googling and found that one can asynchronously execute a script (using the async-attribute). I found that solution here: http://thenextweb.com/socialmedia/2010/08/13/the-twitter-button-is-it-making-your-site-join-the-fail-whale-shuffle/

    So my thanks also to thenextweb.com for explaining that ;-)

    Don’t know if it supports all browsers though. I’m using Chrome 17.0.963.66 and it seems to work. :p

  38. Hey Otto,

    I’m trying to get the STC – Publish plugin working. For the Base, I entered the Twitter Consumer Key and Twitter Consumer Secret, I’m currently logged in as SimballBeta, and Autotweet is set to Twitter User SimballBeta. Automatically Tweet is checked. At Twitter the OAuth and Access Token settings are both set to Read and Write. New posts don’t get Tweeted and Tweet This doesn’t work either. When I try Tweet This the little loading icon just spins. I’m not seeing any errors anywhere, it just doesn’t work.

    Also, is there a way to Autotweet new bbPress topics?

    Thanks in advance!
    DJ

  39. How can I put the Login to twitter box anywhere I want? I’ve been searching for this answer for an hour now, not very impressed with documentation!

  40. Hello there Otto. I just started a music blog using wordpress, and downloaded your plugin to connect it with twitter. I cannot figure out how to place the “follow” button on my page. I have it activated, I just have no idea what to do now. Im assuming its a .php code i have to place somewhere.

    can you help?

    thanks for your time!
    -Trevor McHugh

  41. I have done all the setting on the STC plugin and created the app through Twitter, set up the callback url but it will go through say it is authorized and then just go to a blank page http://www.saywharadio.com/?oauth_token=blahblahlbhalbha. This doesn’t allow me to post to my Twitter. Can anyone help?

  42. Hi. I’ve installed and enabled the “Twitter Follow” button on my site (Twenty Eleven theme) and dragged and dropped it over to the sidebar. I put a basic “Follow on Twitter” in the title box and my Twitter handle in the username box. But when I visit my site, there is no button. Just grey text that says “Follow on Twitter.” How do I get the lovely dark blue “Follow on Twitter” box with the twitter log that you have on your sidebar on this page? Thanks.

  43. So, the past several times I’ve used STC to auto-publish to Twitter, it turns apostrophes & #8217 ; and other characters into their numeric equivalents. No bueno; I have to delete the tweet and then re-do it, or let it go on looking kind of dumb.

  44. Is it safe to delete sub-modules we won’t use?

  45. Hi,

    I’m finding simple twitter connect brilliant, except for one thing … if my blog contains any ‘unusual’ characters, such as an m-dash, for example, this is fed to twitter as a hex code prefixed with & and # followed by a number. Is it possible to stop these characters from being sent to twitter? You’ll see what I mean if you compare the posts at http://www.science-blogger.com with my twitter feed at @Sciblogger

    Thanks

  46. Hi,

    How can I put the loggin button anywhere in my code?

    Thanks

  47. Hi,

    Great plugin! Stupid question. When i post to my fan page from the entry, I notice the url that links back from the FB page is the non-human readable url. Is there something somewhere I need to switch?

    Thanks!!!

    Dennis

    • No, it’s supposed to do that. Twitter prefers short URLs. If it used the long URL, then the tweet might be too long and would be rejected.

      Also, if you use a service like bit.ly or wp.me or whatever for short URLs, then the plugin will automatically use that shortlink instead.

      • I see. Thank you for the quick response. I actually was referring to the Publish on Facebook Page function but I’m guessing its the same deal.

        I will use bit.ly there instead unless you have a different recommendation.

  48. Hello,

    Since I upgraded to the wp 3.4.1. and STC at 0.15, I can not see the processing of article twitter puplisher widget.
    Can you help me?
    Thanks

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.