【发布时间】:2014-07-10 04:13:02
【问题描述】:
目前,我通过以下方式请求 Instagram 的 OAuth 来获取访问令牌:
//Create OAuth
NSString *oAuthURL = [NSString stringWithFormat:@"https://api.instagram.com/oauth/authorize/?client_id=%@&redirect_uri=%@&response_type=token", instagramID, instagramRedirectUri];
self.authWebView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 64.0f, self.view.frame.size.width, self.view.frame.size.height)];
NSURL *url = [NSURL URLWithString:oAuthURL];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[self.authWebView loadRequest:requestObj];
self.authWebView.delegate = self;
[self.view addSubview:self.authWebView];
但是,我希望能够启动原生 Instagram 应用(如果有),类似于 facebook 应用的单点登录。这可能吗?如果 instagram 应用程序只是请求许可并且用户按确定而不是填写他们的凭据,那就太酷了。
谢谢。
【问题讨论】:
标签: ios objective-c facebook oauth instagram