[英]getting list of the group for specific user in LinkedIn via iPhone SDK
I have integrated linkedIn in my iPhone and I am able to post status on linkedIn. 我在我的iPhone中集成了LinkedIn,我可以在linkedIn上发布状态。 But, is there any way that will give me list of groups that user is following and then interact with group.
但是,是否有任何方法可以为我提供用户正在关注的组列表,然后与组进行交互。 I have gone through this , but could not figure out how to use this properly.
我已经完成了这个 ,但无法弄清楚如何正确使用它。
i have tried using: http://api.linkedin.com/v1/groups/{group-id}/posts
But here the problem is that how I will get group-ID. 我尝试过使用:
http://api.linkedin.com/v1/groups/{group-id}/posts
: http://api.linkedin.com/v1/groups/{group-id}/posts
{group-id http://api.linkedin.com/v1/groups/{group-id}/posts
但问题是我将如何获得group-ID。
Any idea would be appreciated. 任何想法将不胜感激。 Thnx in advance.
Thnx提前。
After much wrangling with the Linkedin API Beast, I found the issue to be in the way things are encoded, a long story, in OAuthLoginView.m in method 'requestTokenFromProvider' I needed to include the param 'scope' with the relevant permissions in a OARequestParameter object. 在与Linkedin API Beast进行了多次争吵之后,我发现问题在于事物被编码的方式,一个很长的故事,在方法'requestTokenFromProvider'中的OAuthLoginView.m中我需要将参数'scope'与相关权限包括在一起。 OARequestParameter对象。
(based off the github repo -> https://github.com/synedra/LinkedIn-OAuth-Sample-Client ) (基于github repo - > https://github.com/synedra/LinkedIn-OAuth-Sample-Client )
After that, wherever you're making your api call, (in OAuthStarterKit for example) like in ProfileTabView::profileApiCall you can fire off URL posts like this: using: http://api.linkedin.com/v1/group-memberships ; 在那之后,无论你在哪里进行api调用,(例如在OAuthStarterKit中),如在ProfileTabView :: profileApiCall中,你都可以触发这样的URL帖子:using: http ://api.linkedin.com/v1/group-memberships ; or if you need their email address, it appears (as long as you've got permission to access email, you can grab that too as simply as this:
或者,如果您需要他们的电子邮件地址,则会显示(只要您获得访问电子邮件的权限,您也可以像以下一样抓住它:
NSURL *url = [NSURL URLWithString:@" http://api.linkedin.com/v1/people/~:(id,first-name,last-name,industry,email-address) "]; NSURL * url = [NSURL URLWithString:@“ http://api.linkedin.com/v1/people/~:(id,first-name,last-name,industry,email-address) ”];
See the code for using a OARequestParameter in the URL request below... 请参阅下面的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:)];
}
Hope this answer will help a lot of developers looking for Linkedin
Integration in iPhone. 希望这个答案能够帮助很多开发人员在iPhone中寻找
Linkedin
Integration。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.