Giter Site home page Giter Site logo

Comments (6)

nst avatar nst commented on August 18, 2024

It's a JSON deserialization error.

Could you put a breakpoint in the error block and find out which string cannot be deserialised?

from sttwitter.

alexiob avatar alexiob commented on August 18, 2024

STTwitterOAuth.m:postResource...:491

Printing description of urlString:
https://api.twitter.com/oauth/request_token

Printing description of mutableParams:

{
    "x_auth_mode" = "reverse_auth";
}

510: stTwitterErrorBlock

Printing description of headers:

{
    "Cache-Control" = "no-cache, no-store, must-revalidate, pre-check=0, post-check=0";
    "Content-Encoding" = gzip;
    "Content-Length" = 253;
    "Content-Type" = "text/html; charset=utf-8";
    Date = "Thu, 07 Nov 2013 19:18:38 GMT";
    Etag = "\"f72e05a5dd1602ca4e804325d8afaf5a\"";
    Expires = "Tue, 31 Mar 1981 05:00:00 GMT";
    "Last-Modified" = "Thu, 07 Nov 2013 19:18:38 GMT";
    Pragma = "no-cache";
    Server = tfe;
    "Set-Cookie" = "_twitter_sess=BAh7BzoPY3JlYXRlZF9hdGwrCC2EADRCAToHaWQiJTc5MGQ1ZTYxZjQ2OTcy%250ANGJmNzYzOTZiMzBmMDQzZjI5--f33e5a888cd5a6ed7c553dfe1db811ff3c699ba6; domain=.twitter.com; path=/; secure; HttpOnly";
    Status = "200 OK";
    "Strict-Transport-Security" = "max-age=631138519";
    Vary = "Accept-Encoding";
    "x-frame-options" = SAMEORIGIN;
    "x-mid" = 18bfff6a886df67d768a2680c401c4c7531a9c63;
    "x-runtime" = "0.02626";
    "x-transaction" = 97e28af7bc64be0d;
    "x-ua-compatible" = "IE=10,chrome=1";
    "x-xss-protection" = "1; mode=block";
}

Printing description of error:

Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (Invalid value around character 0.) UserInfo=0xc544ee0 {NSDebugDescription=Invalid value around character 0.}

Printing description of requestID:

7B4418A8-33A9-4E1D-8EA0-C909071974B0

The following is the debug log in the console:

2013-11-07 20:26:18.044 Activate[22328:a0b] --------------------------------------
2013-11-07 20:26:18.044 Activate[22328:a0b] POST https://api.twitter.com/oauth/request_token
2013-11-07 20:26:18.045 Activate[22328:a0b] HEADERS
2013-11-07 20:26:18.045 Activate[22328:a0b]      Authorization = OAuth oauth_consumer_key="***REDACTED***", oauth_nonce="***REDACTED***", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1383852372", oauth_version="1.0", oauth_signature="***REDACTED***"
2013-11-07 20:26:18.045 Activate[22328:a0b]      Content-Length = 24
2013-11-07 20:26:18.046 Activate[22328:a0b]      Content-Type = application/x-www-form-urlencoded ; charset=utf-8
2013-11-07 20:26:18.046 Activate[22328:a0b] COOKIES
2013-11-07 20:26:18.046 Activate[22328:a0b]      guest_id = v1%3A138377602301554490
2013-11-07 20:26:18.047 Activate[22328:a0b] POST DATA
2013-11-07 20:26:18.047 Activate[22328:a0b]      x_auth_mode = reverse_auth
2013-11-07 20:26:18.047 Activate[22328:a0b] --
2013-11-07 20:26:18.048 Activate[22328:a0b] $ curl -i \
-d "x_auth_mode=reverse_auth" \
-b "guest_id=v1%3A138377602301554490" \
-H "Authorization: OAuth oauth_consumer_key="***REDACTED***", oauth_nonce="***REDACTED***", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1383852372", oauth_version="1.0", oauth_signature="***REDACTED***"" \
-H "Content-Length: 24" \
-H "Content-Type: application/x-www-form-urlencoded ; charset=utf-8" \
"https://api.twitter.com/oauth/request_token"
2013-11-07 20:26:18.052 Activate[22328:a0b] --------------------------------------

from sttwitter.

nst avatar nst commented on August 18, 2024

I think you version is not up to date. Could you please try again with the latest version from trunk?

from sttwitter.

alexiob avatar alexiob commented on August 18, 2024

I installed it yesterday using the cocoapods. Should I download & add it to the project manually?

from sttwitter.

nst avatar nst commented on August 18, 2024

Yes, I am pretty sure you won't get the two callbacks anymore.

You can also wait until I release a 0.0.6 CocoaPods version, probably next week.

from sttwitter.

alexiob avatar alexiob commented on August 18, 2024

You were right! It works perfectly!

Thank you very much for the support and the great library.

from sttwitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.