我尝试使用twitteR从Twitter下载帖子,代码如下:
library(twitteR)
consumer_key = "..."
consumer_secret = "..."
access_token = '...'
access_secret = '...'
setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_secret)
u = getUser('realDonaldTrump')
tl = userTimeline(u, n = 3200)
d = twListToDF(tl)
以这种方式下载的推文被截断。例如:
下载地址为:Can’t wait to be back in the amazing state of Tennessee to address the 99th American @FarmBureau Federation’s Annua…
。
是否可以下载整个推文内容?
答案 0 :(得分:1)
将tweet_mode = extended参数添加到API调用中。
答案 1 :(得分:0)