2015-04-04 65 views
0

我使用omniauth訪問配置文件,但我已經設置了linkedin gem並使用omniauth中的訪問tockens,以便我可以分別進行拉取以訪問不同的圖片大小。我的LinkedIn API調用語法有什麼問題?

這裏是我的代碼:

client = LinkedIn::Client.new 
    client.authorize_from_access(auth.extra.access_token.token, auth.extra.access_token.secret) 
    linkedinpicture = client.profile.picture-urls::(original) 

這是不行的,它返回的

undefined local variable or method 'urls' 

一個錯誤,但在同一時間,我知道的API調用者的工作,因爲如果我訪問用戶標題(client.profile.headline),而不是他們的圖片網址,那麼它工作正常。是否需要格式正確的語法?我猜它不喜歡' - '字符。

這裏的LinkedIn資料,我引用:https://developer.linkedin.com/docs/fields/basic-profile

任何想法將是巨大的。

+0

你應該檢查提供'LinkedIn'模塊的gem – 2015-04-04 14:36:04

回答