-
Notifications
You must be signed in to change notification settings - Fork 135
Facebook Login in ios application #97
Comments
Sorry about that. Pushing an update to CocoaPods right now. |
Done!
|
You can't type Swift into Objective-C files. |
You want |
Hi, |
The Facebook response object is built here. Refer to that for all keys that you can use as a SimpleAuth consumer. |
I've tried the keys but I keep getting NS Exception error " this class is not key value coding-compliant for the key token.' |
It's just a dictionary... SimpleAuth.authorize("facebook", completion: { responseObject, error in
let dictionary = responseObject as? [String: AnyObject]
let credentials = dictionary?["credentials"] as? [String: AnyObject]
let token = credentials?["token"] as? String
println("\(__FUNCTION__) \(token)")
}) Or Objective-C if you're into that kind of thing: [SimpleAuth authorize:@"facebook" completion:^(id responseObject, NSError *error) {
NSDictionary *dictionary = responseObject;
NSString *token = dictionary[@"credentials"][@"token"];
NSLog(@"%s %@", __PRETTY_FUNCTION__, token);
}]; |
Have you tried logging |
And the error? |
Can you confirm what version of SimpleAuth you have installed? |
Its the latest version.. I have installed it 2 days ago. |
The most recent time you installed it isn’t really relevant. CocoaPods will lock pods to their initial versions unless you update them explicitly. Can you either confirm which version you have installed, or run |
It works fine for me... Can you paste the exception stack trace? |
Hi,
|
Ok. This bug was only present in 0.3.8, fixed in 0.3.9 (9b7830b). So maybe you need to clean your build, nuke derived data, or something. This works in 0.3.9. Maybe try a clean and see if that helps? |
That worked :)) |
Sorry for the confusion. Yay Xcode. Yep! Once you have the access token you can make any request to the graph API that you have permission for from the user. Just sign the request like you would any other and you're all set! |
Hi,
I implemented Instagram Login in my app , that worked like charm !! Thanks for it :)
Now I'm implementing facebook login , I'm copying this code in my appdelegate( am I doing it right ?).
SimpleAuth.configuration()["facebook"] = [
"app_id" : ""
]
It is saying " Called Object type NSMutableDictionary is not a function or a function pointer "
I'm going to test it on simulator , will it work ?
The text was updated successfully, but these errors were encountered: