【问题标题】:ShareKit twitter 403 (unknown error)ShareKit twitter 403(未知错误)
【发布时间】:2012-03-15 19:26:55
【问题描述】:

我正在使用 ShareKit 通过 FB 和 twitter 进行分享。我正在使用此代码分享到 twitter:

- (IBAction)twitterShare:(id)sender {
    // Create the item to share (in this example, a url)
    NSURL *url = [NSURL URLWithString:[flexViewController shareURL]];
    SHKItem *item = [SHKItem URL:url title:[flexViewController shareText]];

    [SHK setRootViewController:self];
    // Share the item
    [SHKTwitter shareItem:item];
}

我收到“403 Forbidden:服务器理解请求但拒绝执行”。如果提示登录视图,总是会发生这种情况。如果用户已经从较早的会话中登录(应用程序已关闭并重新打开),则它可以正常工作。

在此页面中,它声明 403 表示我已达到限制,我认为这不是我的情况。 https://dev.twitter.com/docs/error-codes-responses

上述代码上周正常运行,但现在我收到此错误。

【问题讨论】:

    标签: ios twitter sharekit


    【解决方案1】:

    使用旧版本的 ShareKit 遇到了同样的问题,可以通过编辑 SHKTwitter.m 的以下部分中的 Twitter URL 来解决。

        - (void)sendStatus
    {
        OAMutableURLRequest *oRequest = [[OAMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://api.twitter.com/1/statuses/update.json"]
    

    ShareKit 2.0 版本中的 URL 不同。

    【讨论】:

    • 谢谢。我试过了,但我已经换了一个不同的工具包。
    猜你喜欢
    • 2012-04-04
    • 2013-08-18
    • 2013-04-05
    • 2013-05-23
    • 2011-04-29
    • 1970-01-01
    • 1970-01-01
    • 2011-07-28
    • 1970-01-01
    相关资源
    最近更新 更多