SparkleNetworks / LinkedInNET

Sparkle.LinkedInNET will help you query the LinkedIn API with C# :)
https://www.nuget.org/packages/Sparkle.LinkedInNET/
GNU Lesser General Public License v3.0
35 stars 51 forks source link

GetMyProfile Parameter Problem #10

Closed keval-gangani closed 8 years ago

keval-gangani commented 8 years ago

Hi,

What should I pass for "acceptLanguage" parameter inside "GetMyProfile" method?

Dim loUser As UserAuthorization = New UserAuthorization(userToken.AccessToken)
Dim profile As Person = api.Profiles.GetMyProfile(loUser, "**[acceptLanguage]**", FieldSelector.For(Of Person).WithAllFields())

Please assist!

sandrock commented 8 years ago

As you may know, one can translate his linkedin profile in different languages. This parameters is used to get the profile values in the desired language.

You may pass a valid .NET CultureInfo.Name or null.

LinkedIn recommends the following 6 most common values.

Language Header Value
English (American) en-US
French fr-FR
German de-DE
Italian it-IT
Portuguese (Brazilian) pt-BR
Spanish es-ES
keval-gangani commented 8 years ago

Thanks for the information but it does not accept null parameter. I'm passing language value like below:

Dim lsLanguage() As String = {"en-US"}
profile = api.Profiles.GetMyProfile(loUser, lsLanguage, FieldSelector.For(Of Person).WithFirstName().WithLastName().WithEmailAddress())