【问题标题】:unable to post an image to twitter using sharekit无法使用 sharekit 将图像发布到 Twitter
【发布时间】:2012-12-20 14:47:29
【问题描述】:

我正在使用 ShareKit 在我的应用程序中发布到 Twitter 和 Facebook。 Facebook 运行良好。

但当我尝试在 Twitter 上发布时,首先显示“已保存”消息,然后立即显示警报消息“错误未知错误”,并且该消息未在 Twitter 中发布。

谁能帮帮我。

我用谷歌搜索了很多,但无法找出问题所在。

希望您的帮助。提前致谢。

【问题讨论】:

    标签: iphone objective-c xcode sharekit


    【解决方案1】:

    确保您使用更新后的shareKit 2.0。请准确关注new install guide,因为它与original sharekit 略有不同。

    【讨论】:

      【解决方案2】:

      我担心你的鲨鱼可能不会更新。 所以检查下面的设置,我们需要从

      更改第 54-56 行的 SHKTwitter.m

      https://twitter.com/ 更改为https://api.twitter.com/

      self.authorizeURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/authorize"];
      self.requestURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/request_token"];
      self.accessURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/access_token"];
      

      然后,在 sendStatus 方法中更新 URL 链接,你必须使用 https 而不是 of http

      OAMutableURLRequest *oRequest = [[OAMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://api.twitter.com/1/statuses/update.json"] consumer:consumer token:accessToken realm:nil signatureProvider:nil];
      

      进行此更改,您将能够分享图片并在分享工具包中发布

      编辑:参考this链接了解更多信息。

      【讨论】:

      • 检查 api 密钥、消费者和秘密密钥或在 dev.twitter.com 重置密钥并更改 sharekit 中的密钥
      • 谢谢..它现在对我有用..我从 github 获取了最新的共享包,并按照您上面提到的进行了更改..
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-28
      • 2015-04-24
      • 1970-01-01
      • 2013-01-15
      • 2015-01-21
      • 2012-08-11
      相关资源
      最近更新 更多