hi I am trying to get user profile information like this once the authentication is successful,
class LinkController < ApplicationController
def callback
client = LinkedIn::Client.new("ddddd", "ffffff")
if session[:atoken].nil?
pin = params[:oauth_verifier]
atoken, asecret = client.authorize_from_request(session[:rtoken], session[:rsecret], pin)
session[:atoken] = atoken
session[:asecret] = asecret
else
client.authorize_from_access(session[:atoken], session[:asecret])
end
@profile = client.profile
@connections = client.connections
puts client.profile(:fields => [:positions]).positions
puts client.connections
end
end
the result i get is as follows:
#<LinkedIn::Profile:0x4a6fdd8>
#<LinkedIn::Profile:0x4a58f30>
#<LinkedIn::Profile:0x4a58af8>
#<LinkedIn::Profile:0x4a58708>
#<LinkedIn::Profile:0x4a583a8>
I really don’t understand what is this and if the information is correct than how to convery it to user readable,
I am new guy to ROR please help me to get this resolved.
Those are objects; use the inspect method to return a human-readable representation:
client.profile.inspect