2017-09-19 1 views
1

내 앱의 LinkedIn에 권한을 부여해야합니다. 내가이 튜토리얼에 의해 내 응용 프로그램을 설정 : https://developer.linkedin.com/docs/ios-sdk 다음,이 방법을 사용하여 로그인을 시도 : 내가 거기에 내 LI 로그인을 입력 할 때,iOS LinkedInSDK로 로그인

- (void)login:(UIViewController *)controller{ 
NSArray *permissions = [NSArray arrayWithObjects:LISDK_BASIC_PROFILE_PERMISSION, LISDK_EMAILADDRESS_PERMISSION, LISDK_W_SHARE_PERMISSION, nil]; 
[LISDKSessionManager createSessionWithAuth:permissions state:nil showGoToAppStoreDialog:YES successBlock:^(NSString *returnState) { 
    LISDKSession *session = [[LISDKSessionManager sharedInstance] session]; 
    NSLog(@"Session LINKEDIN: %@", session.description); 
    NSString *url = [NSString stringWithFormat:@"https://api.linkedin.com/v1/people/~"]; 
    if ([LISDKSessionManager hasValidSession]) { 
    [[LISDKAPIHelper sharedInstance] getRequest:url 
             success:^(LISDKAPIResponse *response) { 
      NSData* data = [response.data dataUsingEncoding:NSUTF8StringEncoding]; 
      NSDictionary *dictResponse = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil]; 
      NSLog(@"Authenticated user name : %@ %@", [dictResponse valueForKey: @"firstName"], [dictResponse valueForKey: @"lastName"]); 
     } error:^(LISDKAPIError *apiError) { 
      NSLog(@"Error : %@", apiError); 
     }]; 
    } 
} errorBlock:^(NSError *error) { 
    NSLog(@"%s","error called!"); 
}]; 

}

내 애플은 링크드 인 응용 프로그램을 열 것을 요구하고 암호를 입력하면 사용 권한을 확인하라는 메시지가 표시되지만 아무런 반응이 없습니다. LinkedIn을 통해 올바른 승인을 수행하려면 어떻게해야합니까? (아마도 WebView에서 FB 또는 Twitter로이를 수행하는 방법이 있습니까?) 감사합니다.

답변

1

을 파악 링크드 로그인이 링크를 이용해주십시오. 방금이 모든 것을 끝냈습니다. tutorial!