WP to Twitter FAQ

All plug-ins:
Donations: $5197.40. Downloads: ~870,000. That’s about one half cent per download. Donors’ Roll

Support this plugin!

Have a feature you’d like to see added? Request it at Fundry!

This FAQ has been closed. You’re encouraged to browse the comments to look for a solution to your problem — comments older than the most recent few hundred are unlikely to help you, as they date to older versions of the plugin. To get support, make your request at the new WP to Twitter support page.

Return to Top

1,036 Comments to “WP to Twitter FAQ”

  1. Hi, all - this is a notice that I’m closing comments on this WP to Twitter support post, and starting a new thread at Support Version 2. The 1,000+ comments on this post are unmanageable for practical support, particularly considering that over half of them date to pre-OAuth implementations and have completely different problems.

    I’ve moved most comments from the last three weeks onto the new thread, for the sake of continuity.

  2. Thanks Joe. I appreciate any help.
     chris

  3. Whoops…
    Wordpress version is the newest 3.0.3. This was a new installation

  4. @Joe thanks for the response

  5. I too wanted to comment that I was not asking to delete WP to Twitter, but was asking to delete my posts… Super excited about the WP to Twitter!

  6. Well, now the plugin it’s running fine. My Goddady shared server was running with PHP 4, I just upgrade to PHP5 and WALLAAA.

    Thanks guys.

  7. Ok, damn. I guess Gaz was faster with that suggestion :)

  8. Hmmm, I just had another simple idea on the “OAuthConsumer” problem. I can’t verify it, because on my sites WP-To-Twitter works perfectly fine at the moment.

    Could anybody affected try to remove all content of the file OAuth.php and tell us what happened? Don’t remove the file, remove its content. For the moment you’ll still need an empty file.

  9. Sorry John - Time zone differences got the better of us and I had to crash out.

    It’s not a case of just going in and hitting delete - for a start, that’s not the way to administer a WordPress site. There could be other dependencies and interactions at play that will cause issues if you just go in deleting stuff.

    Your last post makes it sound like you want someone to do the job for you? If that’s the case, then giving out a shout about it here, should always be to give first refusal to Joe (it’s his site) and I’d suggest you should be prepared to pay him for doing so - I know he’s a modest guy and likely too shy to be as blunt as I am about things like this.

    If you give Joe a shout and he can’t allocate the time, then get back to me (I could use the cash right now).

  10. So how can i freaking delete that stuff. Told you I’m an idiot!

    Thanks also for all of the info…. If anyone can please delete, that would be great!!

  11. Hi John

    Easy part first - re: wp_debug - see: http://codex.wordpress.org/Editing_wp-config.php but if you use it, make sure you install and activate a privacy plugin first (to take your site out of the public eye while debugging) - e.g. More Privacy Options for a multi site install, or Total Privacy for a standalone site - with either, visitors will only see the login screen, not all the debugging info getting output.

    Regarding your error - Fatal error: Cannot redeclare class OAuthConsumer in /[path redacted]/wp-content/plugins/wp-to-twitter/OAuth.php on line 12

    1st - fattrigu - [comments redacted]

    I suspect (but am open to correction) that the key element in your error is the first three words of the error = “Cannot redeclare class”

    To me that says something else has already claimed the class name (OAuthConsumer) and maybe declared its content.

    At this point I would be looking on the server (via FTP or the control panel’s file manager) for several possibilities - multiple instances of the plugin (perhaps having folders with differing version numbers), additional or alternative plugins for twitter, or plugins that have twitter as part of their functionality, and other plugins that may have OTHER NON-TWITTER services that might also use the OAuthConsumer class for their login keys - e.g. facebook, squidoo, LinkedIn, MySpace etc.

    It doesn’t have to be a plugin - it might be a built in function of your theme - lots of them do have these functions built in nowadays. Sometimes the theme author provides a Theme Options page in WordPress admin, sometimes you have to hack the theme files to enter/change/remove the settings.

    Another thing to look for (Joe would need to guide you on this) is a possibility of multiple hooked calls to WP-to-Twitter caused by repeated install/activate/deactivate/uninstall actions if you’ve been doing that kind of thing, although outside of the plugin itself, or the theme templates, I can’t think how that could occur, and WP2T doesn’t touch theme files.

    Try looking at plugins such as Add-to-Any, or Social Icons or Sexy Bookmarks and similar if you have them installed - anything that touches twitter could potential be declaring the class before this plugin gets the chance to do so.

  12. Gaz,

    I appreciate your information, but that is exactly what I am trying to figure out.. you say that you are not a programmer but just a “hack”… well, I am neither, I am a n00b! I do appreciate you giving some ideas of what to look for, and I thought that I had actually looked around for that error message, I must have missed it somewhere.

    Anyway, I appreciate that Joe has done this, and I do know that, obviously, it is working for lots of people… but I just am not one of them. I have copied/repasted the keys many times, looked for the spaces, checked I am on PHP5, however, I do not have SSL, do I need that?? I know that mine is messed up, and am not suggesting that it is a “bug”, I know that I am the bug, but just looking for guidance on how to get it properly setup.

    Thanks for your time.

    On another note, how do you use the “wp_debug=true”??

  13. Justhad an extra thought about /wp-to-twitter/OAuth.php on line 12

    Log into your server and check your database character set and collation type.
    Make sure these are the same as your setup in wp_config.php

    If you’re running WordPress in utf8_general_ci mode, but your server is running in the PHP / SQL default mode of utf8_swedish_ci then you are going to get messed up strings saved to the database - it will rewrite non-alphanumeric characters to unicode formats like %a3 instead of a # symbol (or something like that).

    This is even more true if your install is running in a non-Latin language (Cyrillic, Arabic, Asian languages etc) or a European Latin language that uses strange accents (French, German, Spanish etc).

    Don’t be so quick to blame the plugin when it is more likely to be your server config at fault.

  14. Joe - sorry, I don’t know how you cope with it, but ….

    People - for all those of you reporting problems with /wp-to-twitter/OAuth.php on line 12 …..

    Please give Joe and the rest of us a break - learn to read the file reporting the error, before posting here (or any other support site for that matter).

    OAuth.php line 12 is as follows -

    12: class OAuthConsumer {
    13: public $key;
    14: public $secret;

    So if you are getting an error on line 12, then it’s almost certainly because your twitter oAuth key and secret-key have been copied and pasted incorrectly.

    Check for white spaces before and after the characters in the input field
    Check you have actually copied the correct key from twitter and not an entirely different one anyway.
    Run a php check file to make sure your server is actually delivering your site with PHP 5.x and that it’s not using an emulator.
    Check if your SSL or OpenSSL configs are causing issues - even if you’ve never set them up, your hosts might have done so as part of their account creation system.
    Check file and folder permissions
    etc.
     etc.

    @ Erdern - you said “I auto-publish posts by a plugin that i developed” - do you mean you are expecting Joe to support and provide answers for a plugin you developed, that Joe has never seen the code for? Are you willing to pay Joe to debug and support plugins you write?

    You know people, I’m no programmer - just a hack and copy WordPress site builder, but I see the same “bugs” reported here time and time and time again - does no-one read the information at the top of the page before posting?

    I have this plugin working on 16 of my sites, and a bunch of clients’ sites - some are standalone WordPress, some are multisite, all have a very different mix of plugins and themes, and they’re spread across multiple servers on different continents ranging from cheap shared cPanel hosting to Plesk Clouds to VPS servers - it works on ALL of them, and has always done so, for years, and through many versions of the plugin, and WordPress, and twitter.

    I upgrade with each new version and I’ve never had the issues so many of you are reporting here repeatedly. It makes me think the problem is between the chair and the keyboard, not in the code of the plugin, site, or server.

    Think about it - why does it work for so many people, but not for you - what are you doing differently to the majority of people?

    C’mon - think about what you’re doing, and give Joe (and my email inbox) a break. Learn to fix routine errors yourself. Learn how to use “wp_debug = true” and how to read error logs on your server - you are site administrators, act like site administrators.

  15. James, it’s the same error I’m getting. The FAQ page says it’s because you must be using php4 instead of php5. I am, however, using php5.

    So the plugin doesn’t work for me. I already updated the plugin AND my WordPress version to 3.0.3.

    I posted the question here but Joe is probably swamped with other questions.

    Cesar

  16. I just installed the WP to Twitter functionality, and although it sure looks awesome, and will do everything that I want it to do, I am getting an error!

    I have followed the instructions, but am getting this error:

    Fatal error: Cannot redeclare class OAuthConsumer in /[path_redacted]/wp-content/plugins/wp-to-twitter/OAuth.php on line 12

    I have done everything that was in the instructions, with the API Keys and the Tokens, etc… what am I doing wrong, and how can I fix it??

  17. @all I apologize, but I simply can’t respond to every comment individually. However, I’ll do my best to cover what I can. First of all, please read the FAQ above before submitting your comments. I will ignore questions which are answered above.

    @John, @Dominik OAuth is included with the Plugin, but can be disabled at the server level. It can also be included as part of the PHP installation, and therefore cause conflicts with the plugin. There have been many instances (although still a minority) where the OAuth registration simply doesn’t work — unfortunately, this is not a resolved problem, partially because I’ve yet to gain access to any server exhibiting the problem, and haven’t had time to explore it as an abstract problem.

    @Erdem The plugin is closely tied to WordPress’s existing publishing mechanisms. This is largely because earlier versions caused problems because they were publishing the output from certain plugins which created undesirable Tweet flooding.

    @Marcelo Are you using Bit.ly, or another URL shortener/unshortened URLs? This is a problem I’m working on, and am trying to track down more details.

  18. Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/content/j/a/m/jamessturge/html/wp-content/plugins/wp-to-twitter/jd_twitterOAuth.php on line 18

    Any idea?

  19. @John
    OAuth is no external dependency, it is included in the WP-to-Twitter Plugin. I wouldn’t be too sure that you and your hoster are talking about the same thing.

  20. I could not get the plugin to connect with OAuth, even though everything was set up properly. Created and deleted apps to no avail. (Bummer, cause I used to love it.) I think I figured it out. We had switched servers in an upgrade recently. Our hosting provider said the following: We heard back from our internal Platform department regarding Oauth. It appears as this module is not part of the RHEL (Red Hat Enterprise Linux) list of available packages, it is not able to be installed. Due to stability and security reasons, we cannot install any binaries. Furthermore, it is our firm belief that this issue is actually with the plugin itself. It is recommended that you use a different plugin to accomplish this task. The plugin’s development has been halted and there seems to be no support available for it. I hope this provides clarification. If you have any further questions or concerns, feel free to let us know.

    Tried Twitter Tools as a test, but received the same error message. If others are having issues, it may be their hosts too.

  21. @Leslie:
    That sounds like a collision with another plugin. Which other plugins do you use? Maybe another one that could access twitter?

  22. Hi Joe,
    When i write and publish a post from the WP Post editor, everything seems OK. But I auto-publish posts by a plugin that i developed. I use code publish posts not editor. When i publish posts by code, your plugin doesn’t update my Twitter accounts. Thanks.

    (I’m using WordPress 3.0.3 and WP to Twitter 2.2.4)

  23. I can’t get this plugin to work. Error: “Fatal error: Cannot redeclare class OAuthConsumer in …/wp-content/plugins/wp-to-twitter/OAuth.php on line 12” as well. WP 3.0.3 / WP-to-Twitter 2.2.4 / PHP 5 / New Installation.

  24. Oups, I forgot to provide information : WP 3.0.3 / WP-to-Twitte 2.2.4 / PHP 5 / New Installation.

  25. This plugin doesn’t work :/ “Fatal error: Cannot redeclare class OAuthConsumer in …/wp-content/plugins/wp-to-twitter/OAuth.php on line 12” :’(

  26. Hi, the plugin is very easy to configure, but as other use said I cant get a link in twitter. If I add another tag like #blog# this dont work too… any idea how to solve this problem?

  27. WP version: 3.0.2
    New install
    Ubuntu (Maverick) server
    I was getting an error saying “Twitter now requires authentication by OAuth” and it would not connect to Twitter. I double checked all my keys and everything. I then read this post from DaveF:
    November 11, 2010 at 8:20 am
    I think I figured out the “Twitter now requires authentication by OAuth”, at least for me. I deleted my original app settings at Twitter and setup a new application. With the new keys and secrets everything works perfectly. Not sure it’s not an issue of a incorrect copy of the pw’s/keys, but regardless, it now works. So, in summary, insure the php5-curl package (or equiv on non- debian/ubuntu systems) is installed and then reset all the settings. And by the way, I’m using WP3.0.1 and WP->Twitter 2.2.3 on Ubuntu 10.10 server.

    I disabled the plug-in installed php5-curl (even though regular curl was installed) and re-enabled the plugin. I clicked connect without changing any other settings in the plugin and it’s now working. Thanks DaveF!

  28. Hey, Joe. First of all love your plug-in.

    I’m wondering if Twitter might be up to something. I had the OAuth settings working fine, then all of a sudden last month I started getting the message that others have been talking about:

    “Twitter now requires authentication by OAuth. You will need you to update your settings in order to continue to use WP to Twitter.”

    I already once deleted my application details in Twitter and re-created them, updated WP with new keys, but the message is the same and keeps returning.

    Am I doing something wrong or is this issue from Twitter being a pain?

    Thanks! -John

  29. Hi,

    I’m on WP 3.0.2 and installed the WP-To-Twitter plugin. I was just wondering when you select wordpress as url shortener if it uses the wp.me shortlink when wordpress stats plugin is installed or if it uses the original wp domain url? And if not, are there any plans to implement the wp.me url as well?

    Thanks for the feedback,

    Gianni

  30. Is it possibile to post using the following structure: “#title# #url# by @author”? Now when I select “Individual Authors” in the options and assign their individual twitter accounts under their user profile their @reference show up as the first thing in the post and the #author# code returns plain text of their WP username.

    Basically I would like to control where the @reference shows up.

    Thank you and great work Joe!

  31. I am using cligs service for url shortning. I tried clicking on Check Support and got an error … ” * WP to Twitter was unable to contact your selected URL shortening service.
    * Cligs API result: There was a server problem creating the clig.
    * WP to Twitter successfully submitted a status update to Twitter.”

    The URL is not getting published on twitter. What shud I do.

  32. I am also facing the same problem as Cesar. Any help on that ?

  33. Hi Sohrab,

    this is the same error I was getting. I think it might be because you are using WP as your URL shortener and the URL + other information is making the tweet too long

  34. Hey you guys, I love this plugin, I’m new to wordpress.org (have always been a .com user). So I want when I post a new story, for it to go to my twitter. I’ve gotten the app to do it, but It does not post a link on my Twitter, plus, I get the following error:

    One or more of your last posts has failed to send it’s status update to Twitter. Your Tweet has been saved in your post custom fields, and you can re-Tweet it at your leisure.

    403 Forbidden: The request is understood, but it has been refused. This code is used when requests are being denied due to status update character limits.

    Sorry! I couldn’t get in touch with the Twitter servers to post your new blog post. Your tweet has been stored in a custom field attached to the post, so you can Tweet it manually if you wish!

    I’m using WordPress 3.0.2 and this has been a brand new install of the application.

  35. Technically, all that’s needed to clear the original red error message is a refresh — something that could be fixed, but hasn’t been a priority. As far as your feature request, go ahead and add that to the list at my Fundry suggestions page. Thanks!

  36. Great plugin, its fantastic.

    When editing a post I sometimes get an error from twitter. I click the red heading which takes me to settings and I click the clear error button, but this doesn’t clear the original red error message. I then have to click the original red error message again before it clears - just a minor irritation.

    Latest version of Wp (just upgraded)
    New installtion of WP to Twitter (yesterday)

    Also: feature request - can we also add a selection to send comments to twitter