[Air-L] Twitter data related to a link

Raul Zambrano raulza at gmail.com
Sat Feb 15 07:06:49 PST 2020


Hi Devayani,

If you use R check up this guide

https://www.earthdatascience.org/courses/earth-analytics/get-data-using-apis/use-twitter-api-r/

which is one of many out there.

I use R and rtweet almost on a daily basis for my own research.

Using  rtweet search functions one can get up to 90 fields per tweet, 
several of them covering URLs, including actual source, if available.

Hope this helps.

Cheers, Raul


On 2/14/20 5:00 AM, Sina Furkan Özdemir wrote:
> 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/
> _______________________________________________
> 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