Twitter API - oauth gem - 没有得到回调 [英] Twitter API - oauth gem - not getting callback

查看:53
本文介绍了Twitter API - oauth gem - 没有得到回调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用我的应用程序的 request_token 将我的应用程序用户重定向到 Twitter 以进行 oauth 风格的身份验证.用户可以在 Twitter 的页面上输入用户名和密码,但是 Twitter 不会回调我的应用程序,而是显示一个页面

I redirect the user of my application to Twitter for oauth style authentication using my app's request_token. The user is able to enter username and password on Twitter's page BUT then, instead of calling back my application, Twitter displays a page

您已成功授予访问权限我的应用程序名称!

You've successfully granted access to MyAppName!

只需返回 MyAppName 并输入以下 PIN 码完成过程.123456

Simply return to MyAppName and enter the following PIN to complete the process. 123456

为什么会这样?

我已经在我的应用设置中设置了回调网址.

I have set the callback url in my app's settings.

谢谢

推荐答案

我也遇到了同样的事情.我只是找到解决方案.

Same thing is happening me. I just find the solution.

您可以放置​​ :oauth_callback 参数来获取请求令牌.

You can put :oauth_callback parameter to get request token.

注意:由于最新的 oauth gem,在 2010 年 4 月 29 日对创建和回调方法进行了更改

Note: Because latest oauth gem, changes made in create and callback method on 29/04/2010

检查此文档.http://blog.brijeshshah.com/integrate-twitter-oauth-in-your-rails-application/comment-page-1/

@request_token = UsersController.consumer.get_request_token(:oauth_callback => "callback-url-of-your-twitter-app")

这篇关于Twitter API - oauth gem - 没有得到回调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆