{"componentChunkName":"component---src-templates-post-template-js","path":"/2017/01/28/twitter-bot-bootstrap/","result":{"data":{"mdx":{"frontmatter":{"title":"Easily set up your own Twitter bot","date":"2017 January 28th"},"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"date\": \"2017-01-28T00:00:00.000Z\",\n  \"title\": \"Easily set up your own Twitter bot\",\n  \"tags\": [\"information\", \"guide\"],\n  \"published\": true\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"Want to get set up with your very own Twitter bot quickly and easily,\\nwith this guide you can be set up in under 30 minutes. But first, why\\nshould you want to build a Twitter bot?\"), mdx(\"p\", null, \"There are some really useful Twitter bots out there that do some\\npretty cool stuff they don\\u2019t all spam current hashtags and follow\\nusers relentlessly.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./rust-bird.jpg\",\n    \"alt\": null\n  }))), mdx(\"p\", null, \"Take the \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://twitter.com/twisst\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"Twisst ISS alerts\"), \" bot that\\nsends you a DM when the international space station (ISS) will be\\nvisible at your location.\"), mdx(\"p\", null, \"Or there\\u2019s public service bots like the\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://twitter.com/earthquakeBot\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"Earthquake Robot\"), \" that tweets\\nabout any earthquake greater than 5.0 on the Richter Scale as they\\nhappen.\"), mdx(\"p\", null, \"There\\u2019s \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://twitter.com/GoogleFacts\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"GoogleFacts\"), \" which tweets\\nfacts from Google, just remember to fact check these facts on, err,\\nGoogle?\"), mdx(\"p\", null, \"And of course a robot that tweets poetry,\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://twitter.com/poem_exe\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"poem.exe\"), \" along with one that will\\nretweet your tweets that also happen to be an\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://twitter.com/accidental575\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"Accidental Haiku\")), mdx(\"p\", null, \"Bots can be used for many purposes in my case I have used it to\\nenhance my \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://twitter.com/spences10\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"@spences10\"), \" account by\\nliking and re-tweeting subjects I have an interest in, in the case of\\nthe \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://medium.freecodecamp.com/start-2017-with-the-100daysofcode-improved-and-updated-18ce604b237b\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"#100DaysOfCode\"), \" community challenge there is a\\ncommunity bot which congratulates you on starting\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://twitter.com/hashtag/100DaysOfCode?src=hash\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"#100DaysOfCode\"), \" and again on completing it, these are\\nspecific responses to tweets with keywords for a community, there is\\nalso sentiment detection used under the \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://twitter.com/hashtag/100DaysOfCode?src=hash\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"#100DaysOfCode\"), \"\\ncommunity hashtag where the bot will tweet you with encouraging words\\nif you post a tweet with negative sentiment.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./100daysofcodetweet.png\",\n    \"alt\": null\n  }))), mdx(\"p\", null, \"One question I\\u2019m asked in job interviews quite often is \\u201Cwhat do you\\nget out of working with technology?\\u201C. My answer, \\u201CI like to automate\\nstuff, repetitive tasks to save me time so I can concentrate on other\\nstuff, I like the fact I have saved myself some time\\u201D\"), mdx(\"p\", null, \"In the case of my @spences10 bot it\\u2019s usually an opener for a\\nconversation with another user that follows me, so the bot can\\ninitiate the conversation and I can carry on from where the bot left\\noff.\"), mdx(\"p\", null, \"Bearing this in mind the bot is only as good as the person that has\\nprogrammed it, whilst researching this post I found a really good\\nresource for bots in general,\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://botwiki.org/bot-ethics\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"botwiki.org\"), \" has a bot ethics\\nsection:\"), mdx(\"blockquote\", null, mdx(\"ul\", {\n    parentName: \"blockquote\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Please don\\u2019t make annoying bots\", mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"An annoying bot mentions or follows people who didn\\u2019t ask for it\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Posts common or trending hashtags\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Please don\\u2019t make abusive or harassing robots\"))), mdx(\"p\", null, \"So, ready to get started?\"), mdx(\"p\", null, \"Ok, let\\u2019s do this!!\"), mdx(\"hr\", null), mdx(\"h1\", {\n    \"id\": \"twitter-bot-bootstrap\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h1\"\n  }, {\n    \"href\": \"#twitter-bot-bootstrap\",\n    \"aria-label\": \"twitter bot bootstrap permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Twitter bot bootstrap\"), mdx(\"p\", null, \"This is a bootstrap for setting up a Twitter bot with Node.js using\\nthe \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"twit\"), \" library, the bot will like and re-tweet what you specify\\nwhen configuring it, it will also reply to followers with a selection\\nof canned responses.\"), mdx(\"p\", null, \"As a primer for this there are the great posts by\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://twitter.com/amanhimself\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"@amanhimself\"), \" on making your own\\ntwitter bot and this is an expansion on that with further detail on\\nconfiguration on Heroku\"), mdx(\"h2\", {\n    \"id\": \"what-youll-need\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#what-youll-need\",\n    \"aria-label\": \"what youll need permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"What you\\u2019ll need\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Twitter account \", \"[Duh!]\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Development environment with Node.js and NPM\", mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"c9 account\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Node.js\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"NPM\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Heroku account\")), mdx(\"h2\", {\n    \"id\": \"setup-twitter\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#setup-twitter\",\n    \"aria-label\": \"setup twitter permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Setup twitter\"), mdx(\"p\", null, \"Set up an application on the Twitter account you want to favorite and\\nretweet from via:\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://apps.twitter.com/app/new\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"https://apps.twitter.com/app/new\")), mdx(\"p\", null, \"As an example I\\u2019ll configure the old\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://twitter.com/droidscott\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"@DroidScott\"), \" twitter account I have\\nso you can follow along.\"), mdx(\"p\", null, \"Straight forward enough for the twitter application, just make sure\\nyou add your phone number to your Twitter account before clicking the\\n\", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Create your Twitter application\"), \" button.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./twitter-application-setup.png\",\n    \"alt\": null\n  }))), mdx(\"p\", null, \"You should now be in the \\u2018Application Management\\u2019 section where you\\nwill need to take a note of your keys, you should have your \\u2018Consumer\\nKey (API Key)\\u2019 and \\u2018Consumer Secret (API Secret)\\u2019 already available.\"), mdx(\"p\", null, \"You\\u2019ll need to scroll to the bottom of the page and click the \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Create\\nmy access token\"), \" to get the \\u2018Access Token\\u2019 and \\u2018Access Token Secret\\u2019\\ntake note of all four of them you\\u2019ll need them when setting up the\\nbot.\"), mdx(\"h2\", {\n    \"id\": \"setup-development-environment\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#setup-development-environment\",\n    \"aria-label\": \"setup development environment permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Setup development environment\"), mdx(\"p\", null, \"For this I\\u2019m just going to say use \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://c9.io/\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"Cloud9\"), \" as you can\\nbe up and running in minutes with one of the pre made Node.js\\nenvironments.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./c9-node-env.png\",\n    \"alt\": null\n  }))), mdx(\"h2\", {\n    \"id\": \"set-up-the-bot\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#set-up-the-bot\",\n    \"aria-label\": \"set up the bot permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Set up the bot\"), mdx(\"p\", null, \"In the project tree delete the example project files of \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"client\"), \",\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"package.json\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"README.md\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"server.js\"), \" you\\u2019ll not need them, you\\ncan leve them there if you desire.\"), mdx(\"p\", null, \"In your new Node.js c9 environment go to the terminal and enter:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ git clone https://github.com/spences10/twitter-bot-bootstrap\\n\")), mdx(\"h2\", {\n    \"id\": \"project-structure\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#project-structure\",\n    \"aria-label\": \"project structure permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Project structure\"), mdx(\"p\", null, \"The environment project tree should look something like this.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./project-structure.png\",\n    \"alt\": null\n  }))), mdx(\"h2\", {\n    \"id\": \"node-dependencies\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#node-dependencies\",\n    \"aria-label\": \"node dependencies permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Node dependencies\"), mdx(\"p\", null, \"Before configuring the bot we\\u2019ll need to install some dependencies,\\nfrom the terminal enter:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ npm install --save twit\\n$ npm install --save unique-random-array\\n\")), mdx(\"p\", null, \"Then cd into your new folder \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"cd tw*\"), \" will move you to\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \":~/workspace/twitter-bot-bootstrap (master) $\"), \" form here you can\\nconfigure the bot, from the terminal enter.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ npm init\\n\")), mdx(\"p\", null, \"This will configure the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"package.json\"), \" file with your details as\\ndesired, just keep hitting return if you\\u2019re happy with the defaults.\"), mdx(\"p\", null, \"Onto the Twitter keys, now you\\u2019ll need to add these to the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"config.js\"), \"\\nfile and you can then add some keywords into the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"strings.js\"), \" file for\\nwhat you want to search on.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./c9-strings-config.png\",\n    \"alt\": null\n  }))), mdx(\"p\", null, \"Then add the username of the Twitter account you are using to the\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"tweetNow\"), \" function in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"bot.js\"), \" file, this will ensure your bot\\ndoesn\\u2019t reply to itself when it has been followed by a user.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./c9-strings-config1.png\",\n    \"alt\": null\n  }))), mdx(\"p\", null, \"This step isn\\u2019t strictly necessary if this account isn\\u2019t going to be\\nfollowing any users.\"), mdx(\"p\", null, \"That should be it, go to the terminal and enter \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"npm start\"), \" you should\\nget some output:\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./bot-output.png\",\n    \"alt\": null\n  }))), mdx(\"p\", null, \"Check the Twitter account:\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./twitter-account.png\",\n    \"alt\": null\n  }))), mdx(\"h2\", {\n    \"id\": \"heroku\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#heroku\",\n    \"aria-label\": \"heroku permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Heroku\"), mdx(\"p\", null, \"Cool, now we have a bot that we can test on our dev environment but we\\ncan\\u2019t leave it there, we\\u2019ll need to deploy it to Heroku.\"), mdx(\"p\", null, \"If you haven\\u2019t done so already set up a\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://signup.heroku.com\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"Heroku account\"), \" then select \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Create a new\\napp\"), \" from the dropdown box top right of your dashboard, in the next\\nscreen name the app it if you want, then click \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Create App\"), \".\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./heroku-create-new-app.png\",\n    \"alt\": null\n  }))), mdx(\"p\", null, \"You\\u2019ll be presented with your app dashboard and instructions for the\\ndeployment method.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./heroku-deploy.png\",\n    \"alt\": null\n  }))), mdx(\"p\", null, \"Your app name should be displayed on the top of your dashboard, you\\u2019ll\\nneed this when logging in with the Heroku CLI.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./heroku-app-name.png\",\n    \"alt\": null\n  }))), mdx(\"h2\", {\n    \"id\": \"heroku-cli\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#heroku-cli\",\n    \"aria-label\": \"heroku cli permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Heroku CLI\"), mdx(\"p\", null, \"We\\u2019re going to deploy initially via the Heroku Command Line Interface\\n\", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"CLI\")), mdx(\"p\", null, \"From your c9 environment terminal, log into Heroku \", \"[it should be\\ninstalled by default]\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ heroku login\\n\")), mdx(\"p\", null, \"Enter your credentials.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ cd twitter-bot-bootstrap\\n$ git init\\n$ heroku git:remote -a your-heroku-app-name\\n\")), mdx(\"p\", null, \"Deploy your application.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ git add .\\n$ git commit -am 'make it better'\\n$ git push heroku master\\n\")), mdx(\"p\", null, \"You should get build output on the terminal.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./heroku-build.png\",\n    \"alt\": null\n  }))), mdx(\"p\", null, \"Then check the output with.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ heroku logs -t\\n\")), mdx(\"p\", null, \"All good? Cool! :sunglasses:\"), mdx(\"h2\", {\n    \"id\": \"heroku-variables\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#heroku-variables\",\n    \"aria-label\": \"heroku variables permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Heroku variables\"), mdx(\"p\", null, \"Now that we have our bot on Heroku we can use environment variables to\\nstore our Twitter keys so that if in the future we want to add our\\ncode to GitHub we don\\u2019t have to exclude the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"config.js\"), \" file or add\\nour keys publicly.\"), mdx(\"p\", null, \"If you take a look at the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"config.js\"), \" file of this project you\\u2019ll see\\nthere\\u2019s several lines commented output:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"module.exports = {\\n  consumer_key: process.env.CONSUMER_KEY,\\n  consumer_secret: process.env.CONSUMER_SECRET,\\n  access_token: process.env.ACCESS_TOKEN,\\n  access_token_secret: process.env.ACCESS_TOKEN_SECRET,\\n};\\n\")), mdx(\"p\", null, \"All you need to do is go to the console of your Heroku app and select\\nthe \\u2018Settings\\u2019 sections and add in your Twitter keys, click the\\n\\u2018Reveal Config Vars\\u2019 button and add in the variables with their\\ncorresponding values.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"CONSUMER_KEY\\nCONSUMER_SECRET\\nACCESS_TOKEN\\nACCESS_TOKEN_SECRET\\n\")), mdx(\"p\", null, \"Once you have the Heroku vars set up then you can un-comment the\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"module.exports\"), \" section in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"config.js\"), \" file on your development\\nenvironment and you\\u2019re ready to deploy to Heroku again without your\\nTwitter keys.\"), mdx(\"p\", null, \"Your console commands should look something like this:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ git add .\\n$ git commit -m 'add environment variables'\\n$ git push heroku master\\n\")), mdx(\"p\", null, \"Then you can check the Heroku logs again with.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ heroku logs -t\\n\")), mdx(\"p\", null, \"You should now have a bot you can leave to do its thing forever more,\\nor until you decide you want to change the search criteria :smile:\"), mdx(\"h2\", {\n    \"id\": \"heroku-deployment-via-github\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#heroku-deployment-via-github\",\n    \"aria-label\": \"heroku deployment via github permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Heroku deployment via GitHub\"), mdx(\"p\", null, \"You can also deploy your app by connecting to GitHub and deploy\\nautomatically to Heroku each time your master branch is updated on\\nGitHub, this is straight forward enough.\"), mdx(\"p\", null, \"Go to the \\u2018Deploy\\u2019 dashboard on Heroku, select GitHub as the\\ndeployment method if you have connected your GitHub account to your\\nHeroku account then you can search for the repository so if you forked\\nthis repo then you can just enter \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"twitter-bot-bootstrap\"), \" and\\n\", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Search\"), \" you can then click the \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Connect\"), \" button, you can then\\nauto deploy from GitHub.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./heroku-connect-github.png\",\n    \"alt\": null\n  }))), mdx(\"h2\", {\n    \"id\": \"heroku-troubleshooting\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#heroku-troubleshooting\",\n    \"aria-label\": \"heroku troubleshooting permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Heroku troubleshooting\"), mdx(\"p\", null, \"What do you mean it crashed!?\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"./heroku-crash.png\",\n    \"alt\": null\n  }))), mdx(\"p\", null, \"Ok, I found that sometimes the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"worker\"), \" is set as \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"web\"), \" and it crashes\\nout, try setting the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"worker\"), \" again with:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ heroku ps:scale worker=0\\n$ heroku ps:scale worker=1\\n\")), mdx(\"p\", null, \"Other useful Heroku commands I use:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ heroku restart\\n\")), mdx(\"p\", null, \"By default you can only push your master branch if you are working on\\na development branch i.e. \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"dev\"), \" branch and you want to test on Heroku\\nthen you can use:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ git push heroku dev:master\\n\")), mdx(\"hr\", null), mdx(\"h2\", {\n    \"id\": \"contributing\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#contributing\",\n    \"aria-label\": \"contributing permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Contributing\"), mdx(\"p\", null, \"Please fork this repository and contribute back using pull requests.\"), mdx(\"p\", null, \"Any contributions, large or small, major features, bugfixes and\\nintegration tests are welcomed and appreciated but will be thoroughly\\nreviewed and discussed.\"), mdx(\"hr\", null), mdx(\"h3\", {\n    \"id\": \"links\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#links\",\n    \"aria-label\": \"links permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Links\"), mdx(\"p\", null, \"Credit for the inspiration for this should go to\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://twitter.com/amanhimself\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"@amanhimself\"), \" and his posts on\\ncreating your own twitter bot.\"), mdx(\"p\", null, mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://hackernoon.com/create-a-simple-twitter-bot-with-node-js-5b14eb006c08#.flysreo60\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"create-a-simple-twitter-bot-with-node-js\")), mdx(\"p\", null, mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://chatbotslife.com/how-to-make-a-twitter-bot-with-nodejs-d5cb04fdbf97#.h5ah8dq5n\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"how-to-make-a-twitter-bot-with-nodejs\")), mdx(\"p\", null, mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://medium.com/@spences10/twitter-mctwitbot-4d15cd005dc0#.dp9q5f427\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"twitter-mctwitbot\")), mdx(\"p\", null, mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/amandeepmittal/awesome-twitter-bots\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"awesome-twitter-bots\")), mdx(\"p\", null, \"Other posts detailing useful Twitter bots.\"), mdx(\"p\", null, mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"http://www.brit.co/twitter-bots-to-follow/\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"www.brit.co/twitter-bots-to-follow\")), mdx(\"p\", null, mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"http://www.hongkiat.com/blog/using-twitter-bots/\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"www.hongkiat.com/using-twitter-bots\")));\n}\n;\nMDXContent.isMDXComponent = true;","excerpt":"Want to get set up with your very own Twitter bot quickly and easily,\nwith this guide you can be set up in under 30 minutes. But first, why…","tableOfContents":{"items":[{"url":"#twitter-bot-bootstrap","title":"Twitter bot bootstrap","items":[{"url":"#what-youll-need","title":"What you'll need"},{"url":"#setup-twitter","title":"Setup twitter"},{"url":"#setup-development-environment","title":"Setup development environment"},{"url":"#set-up-the-bot","title":"Set up the bot"},{"url":"#project-structure","title":"Project structure"},{"url":"#node-dependencies","title":"Node dependencies"},{"url":"#heroku","title":"Heroku"},{"url":"#heroku-cli","title":"Heroku CLI"},{"url":"#heroku-variables","title":"Heroku variables"},{"url":"#heroku-deployment-via-github","title":"Heroku deployment via GitHub"},{"url":"#heroku-troubleshooting","title":"Heroku troubleshooting"},{"url":"#contributing","title":"Contributing","items":[{"url":"#links","title":"Links"}]}]}]},"timeToRead":5,"fields":{"slug":"/2017/01/28/twitter-bot-bootstrap/","editLink":"https://github.com/spences10/thelocalhost/edit/authoring/posts/2017/01/28/twitter-bot-bootstrap/index.md"}}},"pageContext":{"slug":"/2017/01/28/twitter-bot-bootstrap/","previous":{"id":"48ad5f29-28f8-5773-a12f-6e4ee7c3d42b","excerpt":"I know why Linus called it that now! If you're reading this there's a good chance you know at least the\nbasics of Git but if like me and you are the only person making\nchanges to your repos then there's a good chance that you just use\n git push…","frontmatter":{"title":"Git and GitHub","date":"2017-01-05T00:00:00.000Z"},"fields":{"slug":"/2017/01/05/git-and-github/"}},"next":{"id":"de5be69a-fd1d-5c6f-924b-1cf56fefaadf","excerpt":"Just some rationalisation of what I'm currently doing. Recently I have decided that I'm going to improve my current skill\nset. To do this I'm studying with freeCodeCamp for a full stack\ndeveloper certification, I'm also trying to learn as much as I…","frontmatter":{"title":"Code life balance","date":"2017-03-15T00:00:00.000Z"},"fields":{"slug":"/2017/03/15/code-life-balance/"}}}}}