[Air-L] Twitter data related to a link

Sina Furkan Özdemir sina.ozdemir at ntnu.no
Fri Feb 14 02:00:48 PST 2020


Hi Devayani,

I think it is possible to do it with python and/or R. I use R with rtweet For my Twitter work. I haven't tracked a link myself but I suspect you can do it with the following code in R.

#---------------
library(rtweet)

api_token = rtweet::create_token(app = "app_name",consumer_key = "consumer_key",consumer_secret = "consumer_secret_key",access_token = "access_token_key",access_secret = "access_secret_key",set_renv = F)

link = "your_link"

link_tweets = search_tweets(q = link,n =  18000,type = "recent", include_rts = TRUE,retryonratelimit = T, token = api_token)

write_as_csv(x = link_tweets,file_name = "link_tweets.csv",prepend_ids = T,na = "",fileEncoding = "UTF-8")
#------------------


You need to create a developer account to connect to API. It's free and it is not a big hassle. 

Hope it helps ??

Best,
Sina



>-----Original Message-----
>From: Air-L <air-l-bounces at listserv.aoir.org> On Behalf Of Devayani Tirthali
>Sent: Friday, February 14, 2020 9:04 AM
>To: Air-L at listserv.aoir.org
>Subject: [Air-L] Twitter data related to a link
>
>Hello list,
>
>I have been trying to figure out how to get data about spread of a link on
>Twitter.
>I see a lot of tools that can provide data on hashtags, users, search terms but
>haven't figured out how to search for links on twitter.
>Any help is appreciated.
>
>Devayani
>_______________________________________________
>The Air-L at listserv.aoir.org mailing list is provided by the Association of
>Internet Researchers http://aoir.org Subscribe, change options or unsubscribe
>at: http://listserv.aoir.org/listinfo.cgi/air-l-aoir.org
>
>Join the Association of Internet Researchers:
>http://www.aoir.org/



More information about the Air-L mailing list