Fetching user profile data from LinkedIn in iPhone sdk

后端 未结 2 1521
刺人心
刺人心 2020-12-30 16:52

Using IOS, I am trying to integrate the LinkedIn into the application. The integration is also working,user login is also working but the I am not able to fetch the data of

相关标签:
2条回答
  • 2020-12-30 17:25

    the above explanation given by Micro is correct ant appropriate

    To get the email id from LinkedIn only change the url

      NSURL *url = [NSURL URLWithString:@"http://api.linkedin.com/v1/people/~:(id,first-name,last-name,maiden-name,email-address,formatted-name,phonetic-last-name,location:(country:(code)),industry,distance,current-status,current-share,network,skills,phone-numbers,date-of-birth,main-address,positions:(title),educations:(school-name,field-of-study,start-date,end-date,degree,activities))"]; 
    

    and you will get the email

    or you want more help you can follow the stack overflow link Not able to fetch Linked connections EMAIL ID

    0 讨论(0)
  • 2020-12-30 17:26

    The question was to get the profile data from LinkedIn after login. The demo application is from https://github.com/ResultsDirect/LinkedIn-iPhone

    We have to do changes in "-(RDLinkedInConnectionID *)profileForCurrentUser " this function. The function is located at LinkedInClientLibrary -> Classes -> RDLinkedInEngine this location.

    We just have to change the below url to get data.

    NSURL* url = [NSURL URLWithString:[kAPIBaseURL stringByAppendingString:@"/v1/people/~/
    "]];
    

    To get the user profile data just change the url to:

    NSURL* url = [NSURL URLWithString:[kAPIBaseURL stringByAppendingString:@"/v1/people/~:(id,first-name,last-name,maiden-name,formatted-name,phonetic-last-name,location:(country:(code)),industry,distance,current-status,current-share,network,skills,phone-numbers,date-of-birth,main-address,positions:(title),educations:(school-name,field-of-study,start-date,end-date,degree,activities))"]];
    

    From this url we can get the data of the profile user.

    To get more fields from user profile refers these links:

    https://developer.linkedin.com/documents/field-selectors https://developer.linkedin.com/documents/profile-fields

    To get data according to fields we have to mention the parent of that fields and needed fields from that.This is listed in https://developer.linkedin.com/documents/profile-fields this link.

    If we want data from education so we have to mention as

    educations:(school-name,field-of-study,start-date,end-date,degree,activities)
    

    educations will be the parent and other data in brackets() are its fields which we can get from profile.

    Hope this will work with you also.

    0 讨论(0)
提交回复
热议问题