Having difficulty embedding a twitter timeline into a shiny app.
tried to follow this code
library(shiny)
runApp(list(ui = fluidPage(
tags$head(tags$script('!function(d,s,id){var js,fjs=d.getElementsByTagName(s) [0],p=/^http:/.test(d.location)?\'http\':\'https\';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");')),
titlePanel(""),
sidebarLayout(
sidebarPanel()
, mainPanel(
a("Soccer", class="twitter-timeline"
, href = "https://twitter.com/pssGuy/timelines/524678699061641216"
, "data-widget-id" = "524686407298596864")
)
)
)
, server = function(input, output, session){
}
)
)
but now that twitter has changed the way they produce widgets i cant figure out how to get w new data widget id. Not super familiar with HTML or JS so any help would be appreciated!
hoping to embed the timeline of "https://twitter.com/CityOfBoston"
Edited to include OP comments on re-formatting as a shiny dashboard page with tabs. I don't think you need the
data-widget-id
anymore. This loads the timeline for me.