访问令牌未在Ruby on Rails的控制台中打印

时间:2013-11-26 06:31:21

标签: ruby-on-rails google-api rest-client

我正在尝试获取Gmail联系人。我在视图中提供了以下网址:

https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.google.com%2Fm8%2Ffeeds&redirect_uri=http%3A%2F%2Flocalhost:3000%2Fgmail&response_type=token&client_id=XXXXXXXXXX.apps.googleusercontent.com    

在控制器中我把params.inspect下面打印出来:

{"controller"=>"apicalls", "action"=>"gmail"}

未打印访问令牌。但是在浏览器中,可以看到访问令牌。

http://localhost:3000/gmail#access_token=xxxxxxx&token_type=Bearer&expires_in=3600

我的问题是如何在控制器中打印此访问令牌?

0 个答案:

没有答案