0
我正在使用rails爲Rails上的Fitbit API創建客戶端(非常類似於twitter api)。Oauth客戶端創建軌道
在我device.rb文件
def fitbit_data
@client = Fitgem::Client.new (
:consumer_key => 'bb1', #I understand the security issues here and will change it for production
:consumer_secret => '81f',
:token => oauth_token,
:secret => oauth_token_secret,
:user_id => uid
)
end
它說,我的語法是錯誤的,之後要求一個 ')':CONSUMER_KEY。我如何獲得正確的語法?
看一看'initialize'方法的源代碼(有88行的例子)https://github.com/whazzmaster/fitgem/blob/master/lib/fitgem/client.rb – cristian
ya,我改變它完全遵循,但我仍然得到語法錯誤。這應該放在哪裏? (device.rb或device_controller.rb)? – Marcus