簡體   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