0
我正在使用Omniauth從Twitter獲取特定用戶的憑據。該OmniAuth對象,我得到的部分是這樣的:使用用戶令牌向Rails中的Twitter API發送請求
credentials=#
<Hashie::Mash secret="XXXX" token="XXXX">
extra=#<Hashie::Mash access_token=#<OAuth::AccessToken:xxxx @token="xxxx", @secret="xxxxx", ..
現在我存儲credentials[token]
和UID
針對特定用戶。在某些時候,我想使用該特定用戶的身份驗證來獲取Twitter API,以避免獲得針對特定IP的150個最大請求。現在我只是在做這樣的:
twitter_user_name = Twitter.user(user_id).screen_name
所以,我該怎麼做才能使用Twitter的寶石使用OmniAuth提供的,而不是做我自己的IP請求(未經身份驗證的調用auth使這些請求和因此限制)