繁体   English   中英

通过iPhone SDK获取LinkedIn中特定用户的组列表

[英]getting list of the group for specific user in LinkedIn via iPhone SDK

我在我的iPhone中集成了LinkedIn,我可以在linkedIn上发布状态。 但是,是否有任何方法可以为我提供用户正在关注的组列表,然后与组进行交互。 我已经完成了这个 ,但无法弄清楚如何正确使用它。

我尝试过使用: http://api.linkedin.com/v1/groups/{group-id}/postshttp://api.linkedin.com/v1/groups/{group-id}/posts {group-id http://api.linkedin.com/v1/groups/{group-id}/posts但问题是我将如何获得group-ID。

任何想法将不胜感激。 Thnx提前。

在与Linkedin API Beast进行了多次争吵之后,我发现问题在于事物被编码的方式,一个很长的故事,在方法'requestTokenFromProvider'中的OAuthLoginView.m中我需要将参数'scope'与相关权限包括在一起。 OARequestParameter对象。

(基于github repo - > https://github.com/synedra/LinkedIn-OAuth-Sample-Client

在那之后,无论你在哪里进行api调用,(例如在OAuthStarterKit中),如在ProfileTabView :: profileApiCall中,你都可以触发这样的URL帖子:using: http ://api.linkedin.com/v1/group-memberships ; 或者,如果您需要他们的电子邮件地址,则会显示(只要您获得访问电子邮件的权限,您也可以像以下一样抓住它:

NSURL * url = [NSURL URLWithString:@“ http://api.linkedin.com/v1/people/~:(id,first-name,last-name,industry,email-address) ”];

请参阅下面的URL请求中使用OARequestParameter的代码...

- (void)requestTokenFromProvider
{
    OAMutableURLRequest *request = 
            [[[OAMutableURLRequest alloc] initWithURL:requestTokenURL
                                             consumer:self.consumer
                                                token:nil   
                                             callback:linkedInCallbackURL
                                    signatureProvider:nil] autorelease];

    [request setHTTPMethod:@"POST"];

    OARequestParameter * scopeParameter=[OARequestParameter requestParameter:@"scope" value:@"r_fullprofile r_contactinfo r_emailaddress"];

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

    OADataFetcher *fetcher = [[[OADataFetcher alloc] init] autorelease];
    [fetcher fetchDataWithRequest:request
                         delegate:self
                didFinishSelector:@selector(requestTokenResult:didFinish:)
                  didFailSelector:@selector(requestTokenResult:didFail:)];    
}

希望这个答案能够帮助很多开发人员在iPhone中寻找Linkedin Integration。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM