title: How to ensure that an action only triggers when an action button is pressed with Shiny
body: <p>I am trying to build a shiny app that, gets some twitter information.
  I only want to run the function that makes the twitter API call when an action button is pressed.
   I have set up an action button, and attached it to an isolate function, however when I open the app it instantly tries to get the twitter data.</p>
  
  <p>The logic is, </p>
  
  <ol>
  <li><p>open app</p></li>
  <li><p>enter search term in textInput box</p></li>
  <li><p>Click action button</p></li>
  <li><p>server code is executed, and a df is returned with my twitter information</p></li>
  </ol>
  
  <pre><code>library(shiny)
  ui &lt;- fluidPage(
  
    # Application title
    #titlePanel("Twitter Analytics"),
  
    fluidRow( 
      column( 4, titlePanel("Twitter Analytics")),
      column( 3),#, textOutput("mysearch") ),
      column( 4, textInput("searchstring", 
                        label = "",
                        value = "")),
      column(1, 
             br(),
             actionButton("action", "go"))
  
    )
  )
  
  server &lt;- function(input, output) {
  
    output$mysearch  &lt;- renderText({
  
      input$action
  
      df &lt;- isolate(search_tweets( input$searchstring , n = 500, include_rts = FALSE))
    }) 
  }
  
  shinyApp(ui, server)
  </code></pre>
  
  <p>How can I ensure that this event only occurs when this button is clicked</p>