linkedin icon indicating copy to clipboard operation
linkedin copied to clipboard

(400): Unknown field {first-name} in resource {Update}

Open fschuindt opened this issue 10 years ago • 1 comments

I have faced this problem when I call @client.network_updates:

LinkedIn::Errors::GeneralError in LinkedinsController#callback
(400): Unknown field {first-name} in resource {Update}

That's the code where I set @client:

def set_linkedin_client
  @client = LinkedIn::Client.new('xxx', 'xxx')
  LinkedIn.default_profile_fields = %w(first-name last-name date-of-birth location:(name) email-address skills certifications educations courses phone-numbers positions languages)
end

I don't know if it's real a issue, but I can't figure out what I am missing.

fschuindt avatar Sep 22 '14 19:09 fschuindt

@fschuindt looks like LinkedIn.default_profile_fields are being set as the :fields argument in the network_updates call, even though those fields don't apply to that call. The work around would be to not set .default_profile_fields OR specify the fields when you call #network_updates:

@client.network_updates(fields: [...])

hundredwatt avatar Nov 22 '14 19:11 hundredwatt