Twitter oauth_callback参数被忽略! [英] Twitter oauth_callback parameter being ignored!

查看:391
本文介绍了Twitter oauth_callback参数被忽略!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的ASP.NET网站上获得Twitter身份验证。当您在Twitter网站上创建应用程序时,您必须指定回调URL,为了争论起见,我已设置为 http: //mydomain.com



我已阅读oAuth 1.0a规范,并使用您自己的自定义代码覆盖此回调URL,您必须发送因此,我的请求网址如下所示:



http://twitter.com/oauth/ request_token?oauth_callback = http%3A%2F%2Fmydomain.com%2Ftwittercallback



假设如果所有的都计划,在你的回答数据,除了您的令牌和令牌密钥参数之外,还接收oauth_callback_confirmed = true的新参数。



但是,我的回答是:
oauth_token = MYTOKEN& oauth_token_secret = MYTOKENSECRET



知道我没有给你们最大的数额去继续,但我在我的智慧结束,为什么我没有收到oauth_callback_confirmed参数。没有这个,我的应用程序保持默认回到回调URL硬编码在Twitter网站上。



感谢,
A。

解决方案

我使用了本指南设置我的电脑用作回拨位置。基本上你以某种方式设置你的hosts文件,清除缓存并添加一些Firefox注册表值。在调试oauth调用的最后,重定向将返回到您的本地PC。



正如我说的,它为我工作。


I'm trying to get Twitter authentication working on my ASP.NET site. When you create the app on the Twitter website, you have to specify a callback URL, which for sake of argument, I have set to http://mydomain.com

I've read the oAuth 1.0a spec, and to override this callback URL with your own custom one you have to send the oauth_callback parameter in the request_token phase (url-encoded of course).

So my request URL looks like this:

http://twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2Fmydomain.com%2Ftwittercallback

Supposedly, if all goes to plan, in your response data, you are supposed to receive a new parameter of oauth_callback_confirmed=true in addition to your token and token secret parameters.

However, my response comes through as: oauth_token=MYTOKEN&oauth_token_secret=MYTOKENSECRET

I know I haven't given you guys the greatest amount to go on, but I'm at my wits end as to why I am not receiving the oauth_callback_confirmed parameter. Without this, my application keeps defaulting back to the callback URL hard-coded on the Twitter website. Please if anyone could help me out, I will be eternally grateful!

Thanks, A.

解决方案

I've used this guide to set up my PC to be used as the callback location. Basically you set up your hosts file in a certain way, clear your cache and add a couple of Firefox registry values. At the end when you are debugging an oauth call the redirect comes back to your local PC.

As I said it worked for me.

这篇关于Twitter oauth_callback参数被忽略!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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