在Objective-C中从Linkedin获取个人头像

时间:2018-12-06 10:04:08

标签: ios objective-c iphone linkedin linkedin-api

我遵循了Authenticating with the Mobile SDK for iOS中linkedin提供的指南。


    [LISDKSessionManager createSessionWithAuth:[NSArray arrayWithObjects:LISDK_BASIC_PROFILE_PERMISSION, LISDK_EMAILADDRESS_PERMISSION, nil]
                                     state:nil
                    showGoToAppStoreDialog:YES
                              successBlock:^(NSString *returnState) {

                                  [[LISDKAPIHelper sharedInstance] getRequest:LINKEDIN_PERSON_DETAILS success:^(LISDKAPIResponse *response) {

                                      NSDictionary* responseDict = [AQCommon getJSonData:response.data];
                                      NSLog(@"%@",responseDict);

                                  } error:^(LISDKAPIError *error) {
                                      NSLog(@"%@",error);
                                     // responseHandler(NO, @"", nil);
                                  }];
                              }
                                errorBlock:^(NSError *error) {
                                    //responseHandler(NO, @"", nil);
                                    NSLog(@"%s %@","error called! ", [error description]);
                                }
 ];

它提供名字,姓氏,emailAddress等,但不提供用户的个人资料图像URL。如何获取个人资料图片?

0 个答案:

没有答案