使用twitter4j在Oauth中出现问题 [英] Problem in Oauth with twitter4j

查看:134
本文介绍了使用twitter4j在Oauth中出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我在调用 twitter.getOauthRequestToken(callbackUrl)时得到的。
我添加了正确的消费者密钥和消费者密钥。

This is what I'm getting while calling twitter.getOauthRequestToken(callbackUrl). I've added the correct consumer key and consumer secret.

    401:Authentication credentials (https://dev.twitter.com/docs/auth) were missing or incorrect. Ensure that you have set valid conumer key/secret, access token/secret, and the system clock in in sync.
<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <error>Desktop applications only support the oauth_callback value 'oob'</error>
  <request>/oauth/request_token</request>
</hash>

我多次调试代码并在调用之前找到了所有凭据。
任何使用过twitter4j的人都可以说明问题吗?或者我应该使用另一个oauth库?有什么建议吗?

I debugged the code multiple times and found every credentials in place before above call is made. Anyone who has used twitter4j or not can please indicate the problem? Or should I use another oauth library? Any suggestions?

推荐答案

我猜您将应用注册为桌面应用。转到Twitter应用程序,删除应用程序并创建一个新应用程序,或者使用web作为应用程序类型编辑现有应用程序。

I guess you registered your app as a "desktop" app. Go to twitter applications and either delete the app and create a new one or edit the existing one with "web" as the app type.

这篇关于使用twitter4j在Oauth中出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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