# File lib/omniauth/strategies/linked_in.rb, line 26
      def user_hash(access_token)
        person = Nokogiri::XML::Document.parse(@access_token.get('/v1/people/~:(id,first-name,last-name,headline,member-url-resources,picture-url,location)').body).xpath('person')
        
        hash = {
          'id' => person.xpath('id').text,
          'first_name' => person.xpath('first-name').text,
          'last_name' => person.xpath('last-name').text,
          'location' => person.xpath('location/name').text,
          'image' => person.xpath('picture-url').text,
          'description' => person.xpath('headline').text,
          'urls' => person.css('member-url-resources member-url').inject({}) do |hash,element|
            hash[element.xpath('name').text] = element.xpath('url').text
            hash
          end
        }
        
        hash[:name] = "#{hash['first_name']} #{hash['last_name']}"
        hash
      end