c# - LinkedIN API call returns only half the profile values -


trying add register/login linkedin feature web app. here externallogincallback method call api.

 public async task<actionresult> externallogincallback(string returnurl)         {             var logininfo = await authenticationmanager.getexternallogininfoasync();             if (logininfo == null)             {                 return redirecttoaction("login");             }              // sign in user external login provider if user has login             var result = await signinmanager.externalsigninasync(logininfo, ispersistent: false);             switch (result)             {                 case signinstatus.success:                     return redirecttolocal(returnurl);                 case signinstatus.lockedout:                     return view("lockout");                 case signinstatus.requiresverification:                     return redirecttoaction("sendcode", new { returnurl = returnurl, rememberme = false });                 case signinstatus.failure:                 default:                     // if user not have account, prompt user create account                     viewbag.returnurl = returnurl;                     viewbag.loginprovider = logininfo.login.loginprovider;                     var externalidentity = httpcontext.getowincontext().authentication.getexternalidentityasync(defaultauthenticationtypes.externalcookie);                     var firstname = externalidentity.result.claims.firstordefault(c => c.type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname").value;                     var lastname = externalidentity.result.claims.firstordefault(c => c.type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname").value;                     return view("externalloginconfirmation", new externalloginconfirmationviewmodel { email = logininfo.email, name = firstname });             }         } 

tried catching externalidentity getting linkedin , got this:

enter image description here

as can see, there 11 fields, when there should more, according linkedin (https://developer.linkedin.com/docs/fields/basic-profile)

how can hold of rest? picture url, or second position? (for reason returns first one)

thanks

you need full profile permission access fields. full profile permission, must linkedin partner.

partner program application form:https://developer.linkedin.com/partner-programs/apply


Comments

Popular posts from this blog

c++ - CPP, 'X' button listener -

shared memory - gstreamer shmsrc and shmsink with h264 data -

.net - Bulk insert via Dapper is slower than inserting rows one-by-one -