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

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?
Im having the same problem, any resolutions?
Got the same problem!
Same problem here, reset permalinks, deactivate reactivate doesn’t work, and website quota not exceeded. Any solution, Otto?
Yip !… got the same problem here
Any solution ?
Telling me you have the same problem over and over doesn’t help matters. I have no idea why you’re having that problem, so until somebody says “this is the problem and why it happens”, then there’s nothing I can do about it.
I don’t have that problem, have no idea how to reproduce that problem, and the error itself doesn’t even make any sense because there are no redirects involved at that part of the code.
When I began setting this up via Twitter, I never saw where it asks for application type where I would set it to browser.
I also never saw where Twitter for login must be enabled. I’m having the same issue with too mamy redirects. Perhaps that is what’s causing the issue?
They’ve changed the app setup since I wrote the instructions, but the details are basically the same even if the layout and path is different.
Go to https://dev.twitter.com/apps. Find your application.
On the Settings tab, make sure the “Callback URL” is filled in with your website’s address. That will automatically put it into Browser mode. Also make sure it’s set to “Read and Write”.
That should be it for settings, really.
These instructions resolved the same problem the above users had. No more redirect message.
Great plugins! Thank you so much
BTW, This would not create the error “RSS Error: WP HTTP Error: Too many redirects”. That “Twitter Status” box is simply trying to show the feed from http://status.twitter.com/rss. That feed has no redirects involved with it.
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
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
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
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.
Ups, I wanna say “& #039;” (without the space between & and #).
Neat! I like how we have the choice of the two!!
The tweet box from the dashboard never ends up tweeting, just sits there with an continuous loading circle thing
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?
Go to https://dev.twitter.com/apps . Select your application. Edit its settings, and put in the proper Callback URL. That would be the URL of your website. For example, mine is “http://ottopress.com/”.
When you have a proper callback URL, it won’t provide you with a PIN anymore.
Cheers Otto, sorted it.
how i set to apear the loging botton on from page.??
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.
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
I’d like to know the same
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.
Auto-tweet works on scheduled posts just fine for me.
Try the development version of the plugin: http://downloads.wordpress.org/plugin/simple-twitter-connect.zip
All I care about is my posts getting auto-tweeted. Nothing else.
I installed the base (non-developers version). I haven’t posted anything new yet, but I have at least one or two a day that I want auto-tweeted.
What else do I have to do to get it to auto-tweet?
I don’t see a specific add-on called auto-tweet, so I’m just wondering which add-on accomplishes this task, and how/what do I have to configure things properly?
I’m also using a custom theme, not sure it that matters…
Once you setup the base plugin, activate the STC-Publish plugin. Then return to the Settings->STC page to find new options.
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
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:)
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); }That’s great, many thanks
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!
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..
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!
Twitter avatars would show up on the site if your theme was doing avatars correctly. Check this thread for information on how to fix the theme:
http://wordpress.org/support/topic/protip-get_avatar-usage-for-theme-authors?replies=22
is there a way to adjust the dimensions of the twitter avatar? by default the avatars on my blog are only half the size.
The plugin uses the “bigger” size avatars twitter provides, which are 73x73px, but specifies the height and width of them at whatever size your theme specifies. So they should expand to fill. If they don’t, then you may have CSS interfering.
great plugin
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?
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.
Noticed the same problem. Is there a reason the plugins don’t use permalink?
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?
I figured out what was wrong!
I don’t know if this is a new feature on twitter, but the default setting for my twitter Application Type was “Read Only.” As the name implies, it prevents app users from actually posting on twitter through your site. Once I changed the application type to “read and write” in the applications settings, it worked just fine.
Screenshot: http://www.naomiyaki.com/assets/twitterApplicationType.png
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)
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!
Works fine!
Great plugin!
How do I manually add Twitter login to my custom login page?
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?
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
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 82Does anybody know how to fix it. (I want to auto post to Twitter)
I had to wrap all classes in OAuth.php and twitterOAuth.php with
if(!class_exists(‘CLASSNAME’)) :
…
endif;
to make it error message disappear. It then worked after disabling a similar plugin.
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
In your tweet, add spaces around the link. You have no space between the — and the http. URLs must stand alone.
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!
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 languagesit produces something likeNew 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?Sorry for the mistake … it should read
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.
writing – in thirty languages
vs.
Automatic writing “–” (without “”)
OK, got it … I can’t post the example here. So let me put it in words – instead of – it shows the HTMLcode for dash & # 8 2 1 1 ; (without spaces)
Instead of posting several comments on my site, you could have just tried to use the development version of the plugin instead, to see if it fixed the problem for you:
http://wordpress.org/extend/plugins/simple-twitter-connect/download/
T apologize for multiple commenting. I was trying to reproduce the HTML code. The development version doesn’t solve the problem. Instead of punctuation marks I see the HTML codes.
Hi Otto and Sal. Has a resolution to this hyphen / dash problem been found at all? I have come across the same issue.
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
&Johnon Facebook!!
There is a place in the code I can Edit so it solves the problem?
Thanks!
sorry…
Transform to:
Joe & # 0 3 8 ; John
(w/o spaces)
Same (still) here … I’m not using STC anymore (because of this problem), but the punctuation marks in HTML code problem is (also) present in SFC. It may has to do with different char codes, though I checked ever possibility (I could check), it’s all in UTF-8.
We are also experiencing this problem with HTML codes showing up in tweets and Facebook posts. Has anyone heard of a solution?
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!!
How to fix
RSS Error: WP HTTP Error: malformed
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
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.
Broken. i Get that same error. No options are beeing displayed. Please fix it Otto!
I have the same problem, no any options.
I have this same issue with not being able to activate any of the modules and just seeing the main settings (ie..Twitter Consumer Key, Twitter Consumer Secret, Twitter Default Button).
In my case the twitter status box on the right side seems to be working OK.
Has anyone managed to resolve this yet?
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
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
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!
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
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?
Can someone please help me with this? I still can not get this plugin to authorize it just keeps going to a blank page after I click authorize. PLEASE HELP!
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.
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.
Is it safe to delete sub-modules we won’t use?
Can I get an answer for this question please? It’s the only reason I’m subscribed to comments.
If you try to delete sub-plugins through the WordPress admin, it will delete the whole plugin. So, no.
Thank you! Just want to make sure. There are a lot of them I don’t use.
I wish it was set up all-in-one like Simple Facebook Connect. It looks like I have a lot more plugins than I do, when they’re really just modules of one.
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
Hi,
How can I put the loggin button anywhere in my code?
Thanks
You can’t. STC does not support logging in from anywhere.
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.
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