[resolved] "Twitter outputted an error: ." (19 posts)

  1. memelab
    Posted 3 years ago #


    I've installed Twitget on my local dev server with its own Twitter API key, and it works beautifully, but on the production server (using new API key), I'm getting the error:

    Twitter outputted an error: <br />.

    Until I updated today, no error was output, but only the static elements of my twitget template were output (no {$user_twitter_name} or tweets within the loop).

    I've tried uninstalling the plugin, and deleting files (and I see that the twitget options are deleted), then reinstalling, and, after updating to 2.1.2, I'm seeing new error message.

    I'm using Twitter's APIv1.1 and have regenerated the Access Token. (In fact, before updating the plugin I deleted and recreated the API key).

    The production server is behind a reverse proxy and I've tried various combinations of @anywhere / callback URL domains in the API settings, to no avail so far...

    Any suggestions? Thanks, Tim


  2. Boštjan Cigan
    Plugin Author

    Posted 3 years ago #

    Does 2.1.2 work on the local dev server?

  3. memelab
    Posted 3 years ago #

    Tx for the prompt reply, Boštjan, sorry for the delay - I've been on other jobs!

    yup, both 2.1.2 and 2.1.4 work on the dev server, which is MAMP, PHP 5.4.10.

    Production is Centos 6.4 running PHP 5.3.3 with FastCGI... not sure what I can tell you about the reverse proxy - I don't know much about it! I've just updated to Twitget 2.1.4 on Prod, and am still getting the same error.

    The production server is: http://nosmokes.com.au/ - for now, I've pasted a static copy of the feed from the dev server, and twitget is outputting the error inside a comment which can be see in the source prefixed by 'twitget: '.

    Can you recommend any test I can run / steps I can take? I tried to install twitter tools on prod, but I don't have enough permissions to install ruby :(

    Thanks for investigating.. if it's of interest to you, I can create a wp user for you...

    Tx, Tim

  4. memelab
    Posted 3 years ago #

    Hokay.. maybe this is more useful.. I added another shortcode and a copy of twitter_status_11() in directly.. I can get options, here is what $tmhOAuth = new tmhOAuth returns:

    object(tmhOAuth)#312 (6) {
      array(0) {
      array(0) {
      array(0) {
      array(29) {
        string(56) "tmhOAuth 0.7.2-SSL - //github.com/themattharris/tmhOAuth"
        string(3) "UTC"
        string(15) "api.twitter.com"
        string(22) "<deleted>"
        string(41) "<deleted>"
        string(50) "<deleted>"
        string(41) "<deleted>"
        string(3) "1.0"
        string(9) "HMAC-SHA1"
        string(70) "<deleted>nosmokes.com.au/wp-content/plugins/twitget/lib/cacert.pem"
        string(59) "<deleted>nosmokes.com.au/wp-content/plugins/twitget/lib"
        string(0) ""
        string(2) "

    (I've deleted sensitive data) - looks like a whole lot of nulls there!

    Also, I've turned on debug logging, and I'm not getting any relevant errors.

    define( 'WP_DEBUG', true );
        // log to wp-content/debug.log
        define( 'WP_DEBUG_LOG', true );
        define( 'WP_DEBUG_DISPLAY', false );
  5. memelab
    Posted 3 years ago #

    For those following along at home, there are debugging scripts for tmhOAuth here: https://github.com/themattharris/tmhOAuth-examples/blob/master/verify.php

    when I run:
    $code = $tmhOAuth->request('GET', $tmhOAuth->url('1/account/verify_credentials'));

    0 (zero) is returned...

    also: if i try verify_ssl.php, I get:

        [raw] =>
        [code] => 0
        [response] =>
        [info] => Array
                [url] => https://api.twitter.com/1/account/verify_credentials.json
                [content_type] =>
                [http_code] => 0
                [header_size] => 0
                [request_size] => 0
                [filetime] => -1
                [ssl_verify_result] => 0
                [redirect_count] => 0
                [total_time] => 0
                [namelookup_time] => 3.5E-5
                [connect_time] => 0.000841
                [pretransfer_time] => 0
                [size_upload] => 0
                [size_download] => 0
                [speed_download] => 0
                [speed_upload] => 0
                [download_content_length] => -1
                [upload_content_length] => -1
                [starttransfer_time] => 0
                [redirect_time] => 0
                [certinfo] => Array
        [error] => Problem with the SSL CA cert (path? access rights?)
        [errno] => 77

    I understand that we're explicitly setting curl_ssl_verifypeer to false, I'm just following every lead! Am I reading that right - looks like there is no reply whatsoever, so is the signal even getting out?

  6. Boštjan Cigan
    Plugin Author

    Posted 3 years ago #

    I don't think it can make a difference, but try pasting the contents of this file:


    In your Twitget folder under


    And paste the logs again afterwards.

  7. memelab
    Posted 3 years ago #

    I've asked this question on stackexchange, too:

    there's a link to a extended debugging output in there...

  8. memelab
    Posted 3 years ago #

    Hi Boštjan, tx for yr reply - I've updated tmhOAuth by pasting the current v0.7.5 files into twitget/lib, including cacert.pem, but no such luck...

    the extended debug output is here: https://gist.github.com/ptim/d99c5b0117274b5d91ba

    And here is the code I'm using to debug:

    i have to crash.. working in just a few hours, tx again

  9. Boštjan Cigan
    Plugin Author

    Posted 3 years ago #

    I still can't get round this one. Have you had any luck?

  10. memelab
    Posted 3 years ago #

    no luck so far Boštjan :/

    I'm still searching for a solution - twitget is one of three solutions failing on this server :(

  11. Boštjan Cigan
    Plugin Author

    Posted 3 years ago #

    Hey memelab, you still there?

    Is there any way you can test something for me on your server that's behind a proxy?


  12. Aleph Ozuas
    Posted 3 years ago #

    Hi, Boštjan

    I am having the same problem in 2 websites. I am getting "Twitter outputted an error".
    Using WP version 3.5.2 and Twitget 3.0.
    Before upgrade the plugin it is working fine.

    One of the websites using it:

    http://ipsilondesign.com.br/ (second footer box, between "ultimas noticias" and Vimeo)

    Thank you in advance!

  13. Boštjan Cigan
    Plugin Author

    Posted 3 years ago #

    Hello aozuas,

    Are you using any characters that are unicode in your Twitter stream? I'm fixing this issue currently and will commit it in version 3.1.

    Update (when it is available) and try it then.

  14. flo_sb
    Posted 2 years ago #

    Hey guys!
    Any sollution on this?
    It was working fine till yesterday, now I notice it dropped.

    Not trying to hijack the thread or anything - just adding abit of my knowledge:
    "I understand that we're explicitly setting curl_ssl_verifypeer to false"
    There's no use to try any cacert.pem with above option set to false because it doesn`t matter.

  15. flo_sb
    Posted 2 years ago #

    sorry for disturbing - seems it was a temporary error for me - all back to normal now :)

  16. TrishaM
    Posted 2 years ago #

    Once again, here's another thread marked 'resolved' that doesn't appear to be from the posts above - if there was a fix, PLEASE post it so that those of us who are having the same "twitter outputted an error" problem can also find the solution, not just a vague unresolved thread that's been erroneously marked resolved.

  17. Boštjan Cigan
    Plugin Author

    Posted 2 years ago #

    To put it simply; I have inputted hours and hours into the development of this plugin and I never got anything out of it, it was just for the fun of it and the good of the community. Just to sort this one out.

    As for the error; I can not reproduce it on my servers (tried multiple times with multiple configurations), so when someone will be willing to give me access to their server and FTP I will gladly "fight" this error and try to fix it for the good of the community and all current and future Twitget users. If I can't get that, I really can't fix it sorry (I've inputted more than 30 working hours into solving this bug and trying to reproduce it).

    So any volunteers for the server part?


  18. max.one
    Posted 2 years ago #

    We will volunteer access to the server with an instance of the plug-in showing this error. Let us know how to go about this.

  19. Boštjan Cigan
    Plugin Author

    Posted 2 years ago #

    I'll need FTP access and VPS access (console).

    Please contact me via email if you are interested. (http://bostjan.gets-it.net).


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Twitget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic