问题描述
我将Twitter添加到我的iOS应用程序中。我在ShareKit中使用iOS 5的TWTweetComposeViewController。它返回TWTweetComposeViewControllerResultDone。所以ShareKit得到sendDidFinish,并认为推文是成功的。它顺利退出。
I added Twitter to my iOS app. I'm using iOS 5's TWTweetComposeViewController in ShareKit. It returns TWTweetComposeViewControllerResultDone. So ShareKit gets to sendDidFinish, and thinks the tweet was successful. It exits smoothly out.
然后< 1分钟,Apple显示一条消息:
Then after < 1 minute, Apple displays a message:
无法发送推文
推文,等等等等blah无法发送,因为与Twitter的连接失败了。
"The tweet, "blah blah blah" cannot be sent because the connection to Twitter failed."
我在中国,我关闭了VPN,所以从技术上讲,消息是正确的。但是,我怎么知道我会收到这条消息?我如何知道推文是否最终发布?这样我就可以保持加载图标仍然在后台旋转。是否有我可以收听的通知消息?
I'm in China, and I turned off the VPN, so technically the message is correct. However, how do I know that I'm going to get this message? How do I know if the tweet is finally posted? that way I can keep the "loading" icon still rotating in the background. Is there a notification message that I can listen for?
谢谢
推荐答案
不知道这是否相关,但是今天只是想通过iphone上的Safari发送推文我得到了无法发送推文的消息。一些实验表明,推文太长了。该推文包含一个链接,Twitter自动缩短并计算为您的推文显示的剩余字符数。
Don't know if this is related, but in simply trying to send a tweet today via Safari on the iphone I got the "Cannot Send Tweet" message. Some experimentation revealed that the tweet was too long. The tweet contained a link, which Twitter automatically shortens and calculates for in the amount of characters left that it displays for your tweet.
看起来Apple正在计算这个错误,因为虽然我的推文显示Safari的推文气泡弹出中剩下3个字符,但当我将相同的信息粘贴到iphone Tweeter app时,它超过了极限。一旦缩短,就可以从Safari发布。
Looks like Apple is calculating this incorrectly, because although my tweet showed 3 characters remaining in Safari's tweet bubble pop-up, when I pasted the same information into the iphone Tweeter app, it was over the limit. Once shortened it posted fine from Safari.
所以我想说Elissa Tong是对的 - Apple的Twitter框架缺少额外的错误检查和通知消息。
So I would say Elissa Tong is right - "Apple's Twitter framework is missing additional error checks and notification messages."
这篇关于无法发送Tweet弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!