Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9078421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:37:05+00:00 2026-06-16T19:37:05+00:00

This question is related to the same one here , but still i am

  • 0

This question is related to the same one here, but still i am facing the same problem that linkedin is only serving the current position informations , how can i get the past positions & education details using the linkedin gem in Rails,my linkedin controller has been shown below, need your assistance.

   require 'linkedin'

   class LinkedinUserController < ApplicationController

   def init_client
     key = "XXXXXX"
     secret = "XXXXXX"
     linkedin_configuration = { :site => 'https://api.linkedin.com',
        :authorize_path => '/uas/oauth/authenticate',
        :request_token_path =>'/uas/oauth/requestToken?scope=r_basicprofile+r_fullprofile+r_emailaddress+r_network+r_contactinfo',
        :access_token_path => '/uas/oauth/accessToken' }

     @linkedin_client = LinkedIn::Client.new(key, secret,linkedin_configuration)
   end

   def auth
     init_client
     request_token = @linkedin_client.request_token(:oauth_callback => "http://#{request.host_with_port}/linkedin/callback")
     session[:rtoken] = request_token.token
     session[:rsecret] = request_token.secret
     redirect_to @linkedin_client.request_token.authorize_url
   end

   def callback
     init_client
     if session[:atoken].nil?
       pin = params[:oauth_verifier]
       atoken, asecret =  @linkedin_client.authorize_from_request(session[:rtoken], session[:rsecret], pin)
       session[:atoken] = atoken
       session[:asecret] = asecret
     else
       @linkedin_client.authorize_from_access(session[:atoken], session[:asecret])
     end

     c = @linkedin_client
     c.profile(:fields=>["first_name","last_name","headline","positions","educations"])
   end
   end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T19:37:06+00:00Added an answer on June 16, 2026 at 7:37 pm

    LinkedIn is very particular about access to profile fields and you cannot combine multiple fields which requires 2 different access.
    so when you try to get just position details by c.profile(:fields => %w(positions)) it assumes the access of type ‘r_basicprofile’ whereas educations field require access of type ‘r_fullprofile’.so try 2 seperate API calls to retrieve both fields.

    “first_name”,”last_name”,”headline”,”positions” available for ‘r_basicprofile’ member permission,so they can be combined together.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is similar to the one i asked here . But its related
This sounds related to this question , but they aren't the same thing. That
[This question is related to but not the same as this one .] If
This question is related to the one I asked here . I'm trying to
This question is related somewhat to the one i asked HERE . Now, i
not sure if this question should be here or in serverfault, but it's java-related
Please note this question related to performance only. Lets skip design guidelines, philosophy, compatibility,
First, I know this question doesn't exactly belong here, but I'll explain later why
This question is geared towards MySQL, since that is what I'm using -- but
This is related to a previous question , but it seems different enough to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.