0

我正在使用 ios SDK 获取 LinkedIn 连接

网址:“ http://api.linkedin.com/v1/people/~/connections

当我发送请求时,我得到了这个:

"errorCode": 0,   "message": "Access to connections denied",   "requestId": "M03UXH6LM7",   "status": 403,   "timestamp": 1371546057294"

我被困在那里。请帮助。

4

1 回答 1

0

这是解决方案:

LOAMutableURLRequest *request =
    [[[LOAMutableURLRequest alloc] initWithURL:requestTokenURL
                                     consumer:self.consumer
                                        token:nil
                                     callback:linkedInCallbackURL
                            signatureProvider:nil] autorelease];

    [request setHTTPMethod:@"POST"];

    LOARequestParameter *nameParam = [[LOARequestParameter alloc] initWithName:@"scope" value:@"r_fullprofile+w_messages+r_network+r_emailaddress"];

    NSArray *params = [NSArray arrayWithObjects:nameParam, nil];
    [request setParameters:params];

    LOARequestParameter * scopeParameter=[LOARequestParameter requestParameter:@"scope" value:@"r_fullprofile w_messages r_network r_emailaddress"];

    [request setParameters:[NSArray arrayWithObject:scopeParameter]];

    LOADataFetcher *fetcher = [[[LOADataFetcher alloc] init] autorelease];
    [fetcher fetchDataWithRequest:request
                         delegate:self
                didFinishSelector:@selector(requestTokenResult:didFinish:)
                  didFailSelector:@selector(requestTokenResult:didFail:)];
于 2013-08-06T13:48:22.583 回答