mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #146] Use of unresolved identifier 'failureHandler' #88
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @FridaySG on GitHub (Nov 12, 2015).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/146
Beginner coder here, not sure what I've done wrong but Xcode is shouting at me from this line:
oauthswift.authorizeWithCallbackURL( NSURL(string: "http://google.com"), scope: "basic", state:"INSTAGRAM", success: {
credential, response, parameters in
println(credential.oauth_token)
}, failure: failureHandler)
Error is as title states, "unresolved identifier". Obviously because failureHandler was never declared but declaring shoots out even more errors. Thanks for any advice in advance.
@phimage commented on GitHub (Nov 12, 2015):
"unresolved identifier" means not defined...
I see, you copy readme code
Go to demo to have real code
https://github.com/dongri/OAuthSwift/blob/master/OAuthSwiftDemo/ViewController.swift
state:"INSTAGRAM"is for instagramyou can generate string like that
Then http://google.com is not a valid callback url, it must be an url that you must handle by url scheme (see readme and the scheme must be yourapplicationname://) or by implementing a webview and its delegate - in final
OAuth2Swift.handleOpenURL(url)must be call@FridaySG commented on GitHub (Nov 12, 2015):
You got it man. Thank you very much for your support. Much appreciated.