Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 如何在vimeo上进行身份验证_Iphone_Objective C_Oauth - Fatal编程技术网

Iphone 如何在vimeo上进行身份验证

Iphone 如何在vimeo上进行身份验证,iphone,objective-c,oauth,Iphone,Objective C,Oauth,我正在使用gtm oauth框架对vimeo进行oatuh身份验证。我的问题是,当我使用gtmo框架成功获取访问令牌时,我调用下面的函数来获取vimeo的视频json值,但我得到了以下错误: {“生成于”:“0.0046”,“stat”:“fail”,“err”:{“code”:“401”,“expl”:“传递的oauth_签名无效”。,“msg”:“无效签名”} 实际上,问题是当我从auth对象获取签名值时,auth对象中不存在签名参数。请指导我在哪里犯了错误: - (void) fetchN

我正在使用gtm oauth框架对vimeo进行oatuh身份验证。我的问题是,当我使用gtmo框架成功获取访问令牌时,我调用下面的函数来获取vimeo的视频json值,但我得到了以下错误:

{“生成于”:“0.0046”,“stat”:“fail”,“err”:{“code”:“401”,“expl”:“传递的oauth_签名无效”。,“msg”:“无效签名”}

实际上,问题是当我从auth对象获取签名值时,auth对象中不存在签名参数。请指导我在哪里犯了错误:

- (void) fetchNetwork:(GTMOAuthAuthentication *)auth
{
    NSLog(@"auth access token %@",auth.accessToken);
      NSLog(@"auth access token %@",auth.token);
    NSLog(@"auth consumer key %@",auth.consumerKey);
    NSLog(@"auth  token%@",auth.token);
    NSLog(@"realm %@",auth.realm);
    NSLog(@"auth  version %@",auth.version);
    NSLog(@"auth  signature method %@",auth.signatureMethod);
    NSLog(@"auth  time stamp%@",auth.timestamp);
    NSLog(@"auth  nonce %@",auth.nonce);


    NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://vimeo.com/api/rest/v2?format=json&method=vimeo.videos.search&oauth_consumer_key=%@&oauth_nonce=%@&oauth_signature_method=%@&oauth_timestamp=%@&oauth_version=%@&oauth_signature=%@&query=amirkhan",auth.consumerKey,auth.nonce,auth.signatureMethod,auth.timestamp,auth.version,@""]];

    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];

                   [request setHTTPMethod:@"GET"];

     NSLog(@"response string:%@",request);
    NSHTTPURLResponse* urlResponse = nil;

    NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&urlResponse error:nil];
     NSLog(@"response string:%@",responseData);
    NSString *strResponse = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
    NSLog(@"response string:%@",strResponse);
    NSLog(@"Response Code: %d", [urlResponse statusCode]);

    }

嗨,我可能来不及回应了。 但是您需要像这样在每个请求中附加经过身份验证的签名

[签名授权请求:请求]


其中signedAuth是在身份验证后返回的GTMOAuthAuthentication的实例

您好,您找到了这个问题的答案了吗。我也有同样的问题。请帮忙。