Hi,
This is the server code, above you can see the API credential:
library(rsconnect)
library(botcheck)
library(shiny)
library(twitteR)
library(rtweet)
consumerKey = "z5ZaOVsPXY■■■■OFgHk6x8jyk"
consumerSecret = "egeAAhrwPPEhBlkhjDhg6ogOkLOKhbTqRFsiT9YnDcOhmxUAg1"
accessToken = "1058770910574985218-V4qaZtUAtH4OHwdXxbnvOnjoE5QUBf"
accessSecret = "HkD3Mp2wXIYHe1m8OlpZYwYC8ncZAkRcI9wnkf6WxCaIL"
my_oauth <- setup_twitter_oauth(consumer_key = consumerKey, consumer_secret = consumerSecret,
access_token = accessToken, access_secret = accessSecret)
options(shiny.sanitize.errors = FALSE)
shinyServer(
function(input,output){
##---------------Get Score-------------------------------------
user<-reactive({lookup_users(input$screen_name)})
output$bot_score<- renderText(botcheck(input$screen_name))
##---------------Details tab-------------------------------------
output$ProfileImage<-renderText({c('<img src="',user()$profile_image_url,'">')})
output$out_screen_name<-renderText(input$screen_name)
output$Display_name<-renderText(user()$name)
output$Description<-renderText(user()$description)
output$Location<-renderText(user()$location)
output$Protected<-renderText(user()$protected)
output$Followers<-renderText(user()$followers_count)
output$Following<-renderText(user()$friends_count)
output$Lists<-renderText(user()$listed_count)
output$Likes<-renderText(user()$favourites_count)
output$TweetsandRetweets<-renderText(user()$statuses_count)
output$LastModified<-renderText(as.character(user()$created_at))
output$Language<-renderText(user()$lang)
output$plot<-renderPlot({hist(ts_plot(get_timeline(input$screen_name, n = 3200), "hours"))})
}
)