开发者

Yahoo OAuth with gtm-oauth for Mac App

开发者 https://www.devze.com 2023-04-08 19:45 出处:网络
Has anyone successfully used gtm-oauth to authenticate to Yahoo for a desktop Mac App?I\'m able to authenticate to Twitter using this library and I feel that I\'ve made the appropriate updates for Yah

Has anyone successfully used gtm-oauth to authenticate to Yahoo for a desktop Mac App? I'm able to authenticate to Twitter using this library and I feel that I've made the appropriate updates for Yahoo OAuth but I consistently get a 401 error when I start the request and the view controller is not shown.

I've updated the values in the OAuthSample project as such:

NSURL *requestURL = [NSURL URLWithString:@"https://api.login.yahoo.com/oauth/v2/get_request_token"];
NSURL *accessURL = [NSURL URLWithString:@"https://api.login.yahoo.com/oauth/v2/get_token"];
NSURL *auth开发者_运维百科orizeURL = [NSURL URLWithString:@"https://api.login.yahoo.com/oauth/v2/request_auth"];
NSString *scope = @"https://api.login.yahoo.com";

Does anyone have any suggestions?


Yahoo's OAuth server does not expect display name or scope parameters.

To use GTMOAuth with Yahoo's OAuth 1 server, set the scope and the display name to nil, like

windowController = [[[GTMOAuthWindowController alloc] initWithScope:nil language:nil requestTokenURL:requestURL authorizeTokenURL:authorizeURL accessTokenURL:accessURL authentication:auth appServiceName:kYahooKeychainItemName resourceBundle:nil] autorelease];

[auth setDisplayName:nil];

Also, be sure that the auth callback URL matches the URL registered with Yahoo.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号