Closed sandrock closed 6 years ago
URLs composed internally with the FormatUrl method are sometimes invalid. URL escaping is not done.
FormatUrl
Example: calling GetPublicProfile(..., "http://www.linkedin.com/in/jeffweiner08", ..., ...) fails:
GetPublicProfile(..., "http://www.linkedin.com/in/jeffweiner08", ..., ...)
[LinkedInApiException: API error (400) Unknown field {www.linkedin.com} in resource {Person} at https://api.linkedin.com/v1/people/url=http://www.linkedin.com/in/jeffweiner08:(id,positions:(id,title,start-date,end-date,is-current,company),picture-url,first-name,last-name,headline,languages:(id,language,proficiency),connections)] Sparkle.LinkedInNET.Internals.BaseApi.ThrowJsonErrorResult(RequestContext context, ApiError errorResult, String json) in src\NET35.Sparkle.LinkedInNET\Internals\BaseApi.cs:589 Sparkle.LinkedInNET.Internals.BaseApi.HandleJsonResponse(RequestContext context) in src\NET35.Sparkle.LinkedInNET\Internals\BaseApi.cs:438 Sparkle.LinkedInNET.Internals.BaseApi.HandleJsonErrorResponse(RequestContext context) in src\NET35.Sparkle.LinkedInNET\Internals\BaseApi.cs:265 Sparkle.LinkedInNET.Profiles.ProfilesApi.GetPublicProfile(UserAuthorization user, String publicProfileUrl, String[] acceptLanguages, FieldSelector`1 fields) in src\NET35.Sparkle.LinkedInNET\Services.tt.cs:5737 Sparkle.LinkedInNET.DemoMvc5.Controllers.ExploreController.PublicProfile(String url, String culture) in src\NET45.Sparkle.LinkedInNET.DemoMvc5\Controllers\ExploreController.cs:402 lambda_method(Closure , ControllerBase , Object[] ) +147
Fix in https://github.com/SparkleNetworks/LinkedInNET/commit/db8e31be41bdc1944227693bf116686fd0a2cd60 Will push new nuget package.
Sparkle.LinkedInNET pushed
URLs composed internally with the
FormatUrl
method are sometimes invalid. URL escaping is not done.Example: calling
GetPublicProfile(..., "http://www.linkedin.com/in/jeffweiner08", ..., ...)
fails: