I am trying to implement twitter login in my ios app. I do not want to use social frame work. I have tried all ways to twitter login but unfortunately this not working. Mainly i am facing the callback url issue in it. Can you please guys help me.
I have tried this url as well
http://codegerms.com/login-with-twitter-example-with-ios-tutorial-using-oauth/
but mainly i am facing the callback issue. Can any one please suggest other plugin.
To get the user's information from Twitter, you can use OAuth.io's iOS SDK: https://github.com/oauth-io/oauth-ios
After having created an account on https://oauth.io, and added Twitter as a provider, you'll be able to get the user's info quite easily. You just need to follow these steps:
Via Cocoa pod:
$ pod install "OAuth.io"
Manually:
Just get the OAuthiOS.framework file here and install it like any other framework.
Add #import <OAuthiOS/OAuthiOS.h> in your ViewController.
@interface MyViewController : UIViewController<OAuthIODelegate>
//[...]
@end
OAuthIOModal *oauthioModal = [[OAuthIOModal alloc] initWithKey:@"your_app_public_key" delegate:self];
[oauthioModal showWithProvider:@"twitter"];
me method:- (void)didReceiveOAuthIOResponse:(OAuthIORequest *)request
{
[_request me:nil success:^(NSDictionary *output, NSString *body, NSHTTPURLResponse
*httpResponse)
{
NSLog(@"name: %@", [output objectForKey:@"name"]);
}];
}
To get more information about the iOS SDK, feel free to check out the guide here:
https://oauth.io/getting-started?ios&None
You can also follow a git based tutorial here:
https://oauth.io/docs/tutorials/client/ios
And find the reference documentation of the SDK here:
https://oauth.io/docs/api-reference/client/ios
Note that OAuth.io also open sourced their core in the oauthd project (check out the repo here: https://github.com/oauth-io/oauthd)
Hope this helps :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With