- (void)viewDidAppear:(BOOL)animated { if (!_oauthAPI) { NSDictionary *credentials = [NSDictionary dictionaryWithObjectsAndKeys: kConsumerKey, kMPOAuthCredentialConsumerKey, kConsumerSecret, kMPOAuthCredentialConsumerSecret, nil]; _oauthAPI = [[MPOAuthAPI alloc] initWithCredentials:credentials authenticationURL:[NSURL URLWithString:@"https://api.linkedin.com/uas/oauth/accessToken"] andBaseURL:[NSURL URLWithString:@"http://api.linkedin.com"]]; _oauthAPI.delegate = (id <MPOAuthAPIDelegate>)[UIApplication sharedApplication].delegate; } else { [_oauthAPI authenticate]; }}is anyone else using the MPOAuthMobile code in their cocoa projects? could do with a hand in troubleshooting the above initialisation method.am I using the correct authenticationURL?I've added in the relevant urls in the oauthAutoConfig.plist fileI'm wanting to just login using a username and password provided by the user up front, (just like the current linkedin iphone app) without having to navigation to a seperate webpage for authentication.any code/comments/replies appreciated.CheersNik
- Log in to post comments
Hi Nik,Though I don't have any experience with working with OAuth on the iPhone, there's no way for you to ask for a LinkedIn member's login and password and exchange it for an accessToken.We specifically support the out-of-band OAuth flow for devices and applications where a callback isn't feasible. On a mobile device, you will have to open our authorization screen in a web browser where the URL is clearly visible to the end user. That said, you can implement OAuth without the out-of-band flow by registering a custom URI scheme and using it as part of your OAuth callbackTaylor