【问题标题】:OAuth implementation for Qt test applicationQt 测试应用程序的 OAuth 实现
【发布时间】:2016-06-04 06:17:41
【问题描述】:

我正在学习 OAuth 以在我的 Qt 应用程序中实现。我使用 this 一步一步的文档来为 twitter 身份验证测试应用程序。这里是以下代码:-

 ox1 = new OXTwitter(this);

    ox1->setClientId("client-id");//Id got from twitter application created.
    ox1->setClientSecret("secret-key");//secret key got from application.
    ox1->setUsername("user-id");
    ox1->setPassword("password");

    connect(ox1, SIGNAL(linkedChanged()), this, SLOT(onLinkedChanged()));
    connect(ox1, SIGNAL(linkingFailed()), this, SLOT(onLinkingFailed()));
    connect(ox1, SIGNAL(linkingSucceeded()), this, SLOT(onLinkingSucceeded()));
    connect(ox1, SIGNAL(openBrowser(QUrl)), this, SLOT(onOpenBrowser(QUrl)));
    connect(ox1, SIGNAL(closeBrowser()), this, SLOT(onCloseBrowser()));
    ox1->link();

但我收到以下错误。我已经在 twitter 应用程序中创建了一个测试应用程序并在我的代码中使用了密钥,但我仍然知道这个错误。

OXTwitter::link O1:nTokenExchangeError: 202 "错误下载https://api.twitter.com/oauth/access_token - 服务器回复: Forbidden" "不允许客户端执行此操作 action" 登录失败

【问题讨论】:

    标签: qt oauth


    【解决方案1】:

    不是代码的问题。

    如果您遇到此问题,请从与应用程序关联的电子邮件地址写信至 api@twitter.com。包括受影响的消费者密钥,API 策略团队将尝试让您尽快恢复。当您从自动化系统收到电子邮件时,请务必回复该电子邮件。

    【讨论】:

      猜你喜欢
      • 2012-09-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-11
      • 1970-01-01
      • 2023-03-14
      • 1970-01-01
      相关资源
      最近更新 更多