Scrape Only English Tweets using Twitter Api in R

I have been working on a project related to Sentiment Analysis of Emojis. I have used this simple code to scrape tweets specifically on the topic "Uber" but I only want tweets in English and the code I am using gives me the tweets from all the languages. How can I scrape or customise my code So I would only get them in English?

My code:

library(lubridate)
library(tidyverse)
library(rtweet)
library(igraph)
library(here)

get_token() # Connects with Twitter API

Uber <- search_tweets("uber", n = 50)

Hi @TalhaAsif ,
Add the language argument to the search_tweets() function

 lang = "en"

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.