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
- Upload the files to the `/wp-content/plugins/simple-twitter-connect/` directory.
- Activate the base plugin through the ‘Plugins’ menu in WordPress.
- Configure Twitter for your site by following the instructions on the Settings screen.
- 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

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!
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…
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? …
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.
I must change my Hoster ! Strato sucks !
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.
would be the correct code to include the stcmeme button in my theme?
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.
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
@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.
I guess we’ll see how much time I have… The main draw of Twitter Stream is that it caches the results…
I am having the same problem as titi & tina, but I do not have any other twitter plugins installed. So this does not fix my issue.
forgot to mention, that Auto Tweet does not work either.
Can someone help me… I still can’t get twitter to post articles … Does anybody help me please.
I am agree with joan bloach this plugin is a great plugin for twitter.
A solution for this might be to either wrap the classes in a conditional to see if they’re already declared
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.
[...] así como esta broma le simulan y le hacen creer que es un espejo real cuando no lo es [...]
this might be to either wrap the classes in a conditional to see
[...] The Deadline For CommentsAtom Default FeedGravatar BoxPHP Code WidgetSimple Facebook ConnectSimple Twitter ConnectUnicornifyNothing to See Here « WordCamp Birmingham 2010 [...]
I was using Twitter Stream and having the same problem , But this works so fine.
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
The counter is not accurate up to the second, you know. It may take 12-24 hours or more for the count to update.
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.
You have some other plugin that is conflicting and loading OAuth as well. You’ll have to disable that other plugin.
Thanks Otto.
It was YOURLS. Disabled it and everything is good.
Hmmm.. I’m using YOURLS on this site without any problem. If you disable the twitter posting features in YOURLS, it should work fine.
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
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.
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.
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.’
That means that it worked. Basically, you’ve logged in with Twitter. Unfortunately, you didn’t actually connect your Twitter account to a WordPress account, so it has no idea *who* to log you in as.
Log in normally, then go to Users->Your Profile and connect your WP and Twitter accounts. Then your login will work.
All working now, thanks.
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?
The plugin has to actually talk to Twitter to get the account information. Did you enable the STC-Publish plugin and set it up for auto publishing to an account? That is how it knows what account to go and get information for.
Yup, the auto-publishing works great for me
Any other ideas on the error messages? Getting the pics to work would be great, but at the moment, I’m more concerned about getting theerror messages off my sidebar. They just showed up after the last update…. Thanks!
http://wordpress.org/support/topic/plugin-simple-twitter-connect-widget-not-working-get-errors?replies=5
worked for me perfectly. Adjusted the code in the plugin, reset the DB entries, and I’m good!
I updated the STC plugin 3 days ago and ever since I am getting + sign instead of ‘space’ while tweeting via the Tweet button.
Yep. I know. Wait for it…
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?
You can’t. I don’t have a sub-plugin to do that yet.
Bummer. Thanks though. I was hoping I could just do some kind of php call and hard code it in. Appreciate the plug in.
Oh. Well, yeah, you can do *that*.
echo stc_get_connect_button();That will produce a connect button. The problem is that other than actually connecting the user to the site, it won’t actually *do* anything.
All these buttons are based around a purpose of some sort. You have to make the button do something afterwards. Otherwise it’s rather pointless. I see this a lot, people ask “how do I put the button in the sidebar” and the answer is really “Well, that depends on what you want the button to actually do”…
Thanks. What I want to do is allow people to login to the site from the home page instead of having to click through to the login page and I am just not sure how to do it. It just might be over my head.
this code doesn’t work. I added it in footer and it doesn’t echoes anything. I would like this button to do the same as it does on login page.
sorry, button is echoed, but how to make it work as it does on login page?
nice post
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?
played with css a bunch. still no luck.
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?
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
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!
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!
Hi…
@John Bloch
Thanks, now it works fine
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!
Hi Otto, It seems that this issue of not being able to log out of STC Comments is more then just me. I noticed in the comments above someone asked about it. There’s also a topic in WP Forums about it: http://wordpress.org/support/topic/plugin-simple-twitter-connect-cannot-logout-of-twitter-in-stc?replies=4 with no resolution of suggestions.
Hope you can respond with something to try? Thanks!
I am also having this problem. I tested it here on your site, and it is working fine. Any Help with this issue is much appreciated.
To visit a page with comments if you would like to see the scenario look here.
LINK TO A SINGLE POST PAGE ON SCAMARTIS26.COM
Great plugin otherwise, thank you!
Having problems loggin out of STC. Please respond with a fix. Thank You.
Also having problem after posting a comment. Receive error message about CAPTCHA not being used, however no CAPTCHA form appears once logged in.
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?
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.
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
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
i ve got the same problem of OSUKI. wordpress 2.9 After insallation SETTING PAGE is blank
any help?
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
You set up your application wrong. You need to make it a Browser application, not a desktop one.
[...] Simple Twitter Connect is a series of plugins that let you add any sort of Twitter functionality you like to a WordPress blog. [...]
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.
The Login plugins do that right now. Look on the Users->Your Profile screen.
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.
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?
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?
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?
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!
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
About STC – TweetMeme Button I’d like to choice the final position (e.g. top right). I’ve also a facebook shareware button
Fabrizio
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
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
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?
Okay. Logout doesn’t work. I know about this. No ETA on a fix.
I would like the same type of connect widget for the Twitter connect as the Facebook one.