Cannot Send Tweet popup appears

醉酒当歌 提交于 2019-12-30 06:03:10

问题


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.

Then after < 1 minute, Apple displays a message:

"Cannot Send Tweet"

"The tweet, "blah blah blah" cannot be sent because the connection to Twitter failed."

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?

Thank you


回答1:


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.

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.

So I would say Elissa Tong is right - "Apple's Twitter framework is missing additional error checks and notification messages."



来源:https://stackoverflow.com/questions/9837285/cannot-send-tweet-popup-appears

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!