Closed differenz-manan closed 4 years ago
It seems there is a bug in the code responsible for generating the profile fields.
positions:(id,title,start-date,end-date,is-current,company,id,title,summary,start-date,end-date,is-current,company),
three-current-positions,
three-past-positions,
There is no positions
field. The sub-fields for three-current-positions
and three-past-positions
seem to aggregate in the positions
virtual field.
I suggest you specify the fields you desire by hand or with the extension methods.
You (or someone else) may also fix the bug by following those steps:
Here is a workaround inspired by your PR:
var profile = api.Profiles.GetMyProfile(
user,
FieldSelector.For<Person>().AddRange("first-name", "last-name", "headline", "site-standard-profile-request", "id", "maiden-name", "formatted-name", "phonetic-first-name", "phonetic-last-name", "formatted-phonetic-name", "location:(name)", "location:(country:(code))", "industry", "distance", "relation-to-viewer", "current-status-timestamp", "current-share", "num-connections", "num-connections-capped", "summary", "specialties", "positions:(id,title,start-date,end-date,is-current,company,summary)", "picture-url", "site-standard-profile-request", "api-standard-profile-request:(url)", "api-standard-profile-request:(headers)", "public-profile-url", "email-address", "last-modified-timestamp", "proposal-comments", "associations", "interests", "publications", "patents:(id,title,summary,number,status:(id,name),office:(name),inventors:(id,name,person),date,url)", "languages:(id)", "languages:(language)", "languages:(proficiency)", "skills", "certifications:(id,name,authority:(name),number,start-date,end-date)", "educations", "courses", "volunteer:(volunteer-experiences:(id,role,organization:(name),cause:(name)))", "three-current-positions", "three-past-positions", "num-recommenders", "recommendations-received", "recommendations-received:(id,recommendation-type:(code),recommendation-text,recommender:(id,first-name,last-name,num-connections,headline))", "following", "job-bookmarks", "suggestions", "date-of-birth", "member-url-resources", "related-profile-views", "honors-awards", "phone-numbers", "bound-account-types", "im-accounts", "main-address", "twitter-accounts", "primary-twitter-account", "connections", "group-memberships", "network"));
This project is not maintained any more. Please check the README page to find alternatives.
Hi, I'm getting exception in retrieving people profile info api with all fields.
Here is my code.
var profile = api.Profiles.GetMyProfile(user, acceptLanguages, FieldSelector.For<Person>().WithAllFields());
Exception details:
Please help me with this problem.
Thank you. Manan