OAuth request_token not returning a token (using twitter-async)


#1

On some of my development environments, when I curl request_token, I get the following:

    ["responses:private"]=>
    array(1) {
      ["Resource id #287"]=>
      array(6) {
        ["data"]=>
        bool(false)
        ["code"]=>
        int(0)
        ["time"]=>
        float(0)
        ["length"]=>
        float(0)
        ["type"]=>
        bool(false)
        ["url"]=>
        string(43) "https://api.twitter.com/oauth/request_token"
      }
    }
    ["properties:private"]=>
    array(5) {
      ["code"]=>
      int(2097154)
      ["time"]=>
      int(3145731)
      ["length"]=>
      int(3145743)
      ["type"]=>
      int(1048594)
      ["url"]=>
      int(1048577)
    }

On other development environments running identical code, it works fine and returns all the headers and the right data string.

Any idea what the difference could be? I already checked and the time is correct in all environments.


#2

It’s really hard for us to help when the error case you’re presenting is so framework-centric. It’s impossible to tell what’s a framework issue and what’s an issue with the API itself. Are you able to get closer to the metal on this and see more clearly what the API itself is responding to you, including a body, HTTP status code, HTTP headers, and so on.

Libraries are great but they really get in the way of actually dealing with problems when they arise.


#3

Figured it out. You were right, it was a framework-specific issue after all.

For anyone else who stumbles across this, here’s a link to the solution: https://github.com/jmathai/twitter-async/issues/119#issuecomment-1501950

Thanks for the quick response, Taylor!