嗨我想在验证成功后尝试获取此类用户个人资料信息,
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
我得到的结果如下:
#<LinkedIn::Profile:0x4a6fdd8>
#<LinkedIn::Profile:0x4a58f30>
#<LinkedIn::Profile:0x4a58af8>
#<LinkedIn::Profile:0x4a58708>
#<LinkedIn::Profile:0x4a583a8>
我真的不明白这是什么,如果信息是正确的,而不是如何将其传达给用户可读,
我是ROR的新人请帮助我解决这个问题。