[GH-ISSUE #138] Sample code in the readme is incorrect for oauth2 #87

Closed
opened 2026-03-03 16:45:33 +03:00 by kerem · 1 comment
Owner

Originally created by @dougw on GitHub (Nov 5, 2015).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/138

It looks like the signature for the success callback has changed -- and should include 'parameters'.

The current code does not compile.

The fix is below

oauthswift.authorizeWithCallbackURL( NSURL(string: "oauth-swift://oauth-callback/instagram"), scope: "likes+comments", state:"INSTAGRAM", success: {
    credential, response, **parameters** in
    println(credential.oauth_token)
}, failure: failureHandler)
Originally created by @dougw on GitHub (Nov 5, 2015). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/138 It looks like the signature for the success callback has changed -- and should include 'parameters'. The current code does not compile. The fix is below ``` oauthswift.authorizeWithCallbackURL( NSURL(string: "oauth-swift://oauth-callback/instagram"), scope: "likes+comments", state:"INSTAGRAM", success: { credential, response, **parameters** in println(credential.oauth_token) }, failure: failureHandler) ```
kerem 2026-03-03 16:45:33 +03:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@phimage commented on GitHub (Nov 7, 2015):

please close this issue
You open two identic issue , see #137

<!-- gh-comment-id:154667458 --> @phimage commented on GitHub (Nov 7, 2015): please close this issue You open two identic issue , see #137
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#87
No description provided.