本文介绍了Twitter api文本字段值被截断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 为什么文本字段值被截断,我怎样才能获得完整的值。 截至目前我正在尝试获取如下文本字段值why text field value is truncated and how can i get complete value.As of now i am trying to get text field value like belowdo { if let responseObject = try NSJSONSerialization.JSONObjectWithData(response, options: []) as? [String:AnyObject], arrayStatuses = responseObject["statuses"] as? [[String:AnyObject]] { let arrTweets:NSMutableArray = NSMutableArray() for status in arrayStatuses { let text = status["text"]! print(status["text"]!) } }} 输出 RT @WarfareWW:#俄罗斯/#印度可能会举行苏拉发布的BrahMos巡航导弹-30MKI vs sea / grnd trgts在今年年底https:// ...RT @WarfareWW: #Russia/#India may hold launches of BrahMos cruise missiles from Su-30MKI vs sea/grnd trgts at the end of this year https://…在行尾有三个点。我需要打印完整的文本而不截断。three dots at the end of line. i need to print complete text without truncation. Twitter样本搜索结果JSON数据Twitter sample search result JSON Data{ "created_at": "Mon Aug 01 08:07:43 +0000 2016", "id": 760024194079916032, "id_str": "760024194079916032", "text": "RT @khalidasopore: #KEXIT #KASHEXIT #KashmirKillings #Inida #Pakistan Just trend it my dear Indians to save #Kashmir from Pak Goons https:/…", "truncated": false}推荐答案 Twitter API已被更改最近,支持关于280个字符限制的新规则。The Twitter API has been changed recently, to support new rules regarding the 280 characters limit. 要获取推文的全文,请添加参数 tweet_mode ,值扩展到您的请求参数。 字段 text 已替换为 full_textTo get the full text of the tweet, add parameter tweet_mode with value extended to your request parameters.Field text in the JSON response has been replaced by full_text更多信息: https://dev.twitter.com/overview/api/upcoming-changes-to-tweets 这篇关于Twitter api文本字段值被截断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-19 19:20