{"id":14907,"date":"2020-05-13T11:34:00","date_gmt":"2020-05-13T06:04:00","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/"},"modified":"2025-01-31T00:21:32","modified_gmt":"2025-01-30T18:51:32","slug":"twitter-bot","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/","title":{"rendered":"How to build your own Twitter Auto Liker bot | How to Create Twitter Bot"},"content":{"rendered":"\n<p>Contributed by - Harshit Roy<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong><a href=\"#sh1\">What is a twitter bot<\/a><\/strong><\/li><li><strong><a href=\"#sh2\">Setup Requirements<\/a><\/strong><\/li><li><strong><a href=\"#sh3\">Creating the GUI<\/a><\/strong><\/li><li><strong><a href=\"#sh4\">Creating the bot<\/a><\/strong><\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-a-twitter-bot\"><strong>What is a Twitter Bot<\/strong><\/h2>\n\n\n\n<p>Twitter bots are automated user accounts that interact with Twitter using an application programming interface (API). These bots are programmed to perform tasks normally associated with human interaction such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>&nbsp;following users,<\/li><li>&nbsp;like tweets,<\/li><li>&nbsp;direct message (DM) other users,&nbsp;<\/li><li>and, most importantly, they can tweet content, and retweet anything posted by a specific set of users or featuring a specific hashtag.&nbsp;<\/li><\/ul>\n\n\n\n<p>Many of these bots perform important tasks, such as tweets about earthquakes in real-time and serve as part of a warning system. In the case of a campaign, however, political or otherwise, they are normally used to generate mass interest in specific content by spreading messages at a rate that isn\u2019t possible with human users. A research paper produced by Indiana University in March 2017 found that 15 percent of all Twitter accounts were bots.\u00a0Take up a <a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/spark-twitter-streaming\" target=\"_blank\" rel=\"noreferrer noopener\">Spark Twitter Streaming<\/a> Online Course to learn more about Twitter Streaming in Real-time. <br><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"HOW TO CREATE A TWITTER BOT USING PYTHON\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/YdHV__vm7EQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>In this tutorial, we are going to make a bot that can like posts related to a specific hashtag.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"setup-requirements-for-twitter-bot\"><strong>Setup Requirements for Twitter Bot<\/strong><\/h2>\n\n\n\n<p>Follow the steps below to fulfill the requirements for designing and running the bot successfully.<\/p>\n\n\n\n<p><strong>Install Python<\/strong>: We will use the <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-tutorial-for-beginners-a-complete-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Python programming language (opens in a new tab)\">Python programming language<\/a> to create the bot. Incase Python is not already installed, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Download the installer from <a href=\"https:\/\/www.python.org\/downloads\/\" target=\"_blank\" rel=\"nofollow noreferrer noopener\" aria-label=\" (opens in a new tab)\">here<\/a>&nbsp;<\/li><li>Install it<\/li><\/ol>\n\n\n\n<p>. Alternatively, you can check out <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.mygreatlearning.com\/blog\/python-tutorial-for-beginners-a-complete-guide\/\" target=\"_blank\">this<\/a> article to get a step by step guide for installing python.<\/p>\n\n\n\n<p><strong>Download Webdriver<\/strong>: WebDriver is a remote control interface that enables introspection and control of user agents. It provides a way for out-of-process programs to remotely instruct the behavior of web browsers. In this tutorial, we use a driver called \u201d gecko\u201d which is designed for Mozilla firefox. Follow the steps below to download and use it<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Download the appropriate version from <a rel=\"noreferrer noopener nofollow\" aria-label=\"here (opens in a new tab)\" href=\"https:\/\/github.com\/mozilla\/geckodriver\/releases\" target=\"_blank\">here<\/a><\/li><li>Extract the executable file (.exe) file from the zip and paste it in the following folder. Go to your C drive and follow this path<\/li><li>Users\u2192\u201d Your user folder\u201d\u2192AppData\u2192Local\u2192Programs\u2192Python\u2192Python36-32(\u201cthe name of the folder can be slightly different for different users\u201d)<\/li><li>Paste the .exe file in the Python36-32 folder.<\/li><\/ol>\n\n\n\n<p>Note that the Mozilla Firefox should be installed on your PC for this tutorial to run.You can download it from <a href=\"https:\/\/www.mozilla.org\/en-US\/firefox\/new\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\" aria-label=\"here (opens in a new tab)\">here<\/a><br><\/p>\n\n\n\n<p>Now let us install the necessary packages required:<br><\/p>\n\n\n\n<p><strong>Install Selenium: <\/strong>Selenium is an open-source tool that automates web browsers. It provides a single interface that lets you write test scripts in programming languages like Ruby, Java, NodeJS, PHP, Perl, Python, and C#, among others.<\/p>\n\n\n\n<p>We use the Selenium web driver for the purpose of logging in into an account and scrolling the page of the feeds. To install selenium, open the command prompt, and type this code and press enter.<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install selenium<\/code><\/pre>\n\n\n\n<p><strong>Install Tkinter: <\/strong>Tkinter is the standard GUI library for Python. Python, when combined with Tkinter, provides a fast and easy way to create GUI applications.<\/p>\n\n\n\n<p>In this program, we use Tkinter to get the username and password of the user. Also, the user puts the specific hashtag for which the posts are to be liked. To install Tkinter, open the command prompt and type this code and press enter.<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install tkintertable\n\ufeff<\/code><\/pre>\n\n\n\n<p><strong>Install Pyautogui: <\/strong>PyAutoGUI lets your Python scripts control the mouse and keyboard to automate interactions with other applications.<\/p>\n\n\n\n<p>We use Pyautogui to click on the like button. To install Pyautogui, open the command prompt, and type this code and press enter.<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install PyAutoGUI<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"creating-gui\"><strong>Creating GUI<\/strong><br><\/h2>\n\n\n\n<p>We create a form using the Tkinter module to get information about the user. In the form, we ask the user email address, user password, and the keyword for which the posts are to be liked. Here is the code for creating the form:<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from tkinter import *\nwindow=Tk()\n#set dimensions of form window\nwindow.geometry(\"700x200\") #change the values to change size of window\n\n#Get email from the user and store it in entry1\nemails=Label(window,text=\"Enter your email here\",font='times 24 bold')\nemails.grid(row=0,column=0) #define loc of the label on from\nentry1=Entry(window)\nentry1.grid(row=0,column=6)#define loc of the entry on from\n\n#Get password  from the user and store it in entry2\npassword=Label(window,text=\"Enter your password here\",font='times 24 bold')\npassword.grid(row=2,column=0)\nentry2=Entry(window,show=\"*\")\nentry2.grid(row=2,column=6)\n\n#Get hashtag from the user and store it in entry3\nhashtag=Label(window,text=\"Enter the seach keyword here\",font='times 24 bold')\nhashtag.grid(row=3,column=0)\nentry3=Entry(window)\nentry3.grid(row=3,column=6)\n\nb1=Button(window,text=\" GO \",command=execute,width=12,bg='grey')\nb1.grid(row=6,column=0)\nwindow.mainloop()\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"creating-the-bot\"><strong>&nbsp;Creating the Bot<\/strong><br><\/h2>\n\n\n\n<p>Finally, let us create an automated bot to like tweets for us automatically. First, create a class, twiiter_bot which contains all the necessary functions. The objects of this class need three attributes, viz- username (email address of account), password and the web driver we are using<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class twitter_bot:\n\tdef __init__(self,username,password):\n\t\tself.username=username\n\t\tself.password=password\n\t\tself.bot=webdriver.Firefox()\n<\/code><\/pre>\n\n\n\n<p>Next, we define a login function which performs the following task:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Open the browser and open twitter<\/li><li>Login using the credentials from the form<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>def login(self):\n\t\tbot=self.bot\n\t\tbot.get('https:\/\/twitter.com\/')\n\t\ttime.sleep(5)\n   \t\t#find elements for username and password in the webpage\n\t\temail=bot.find_element_by_name('session&#91;username_or_email]')\n\t\tpassword=bot.find_element_by_name('session&#91;password]')\n\t\temail.clear() #clear the session variable incase it contains anything\n\t\tpassword.clear()\n\t\temail.send_keys(self.username)\n\t\tpassword.send_keys(self.password)\n\t\tpassword.send_keys(Keys.RETURN)\n\t\ttime.sleep(10)\n<\/code><\/pre>\n\n\n\n<p>Note that we have used the sleep function to delay the process. This is done so that the process may seem natural and twitter does not detect the bot.<br><\/p>\n\n\n\n<p>Next, we define a function&nbsp; like_tweet&nbsp; which takes the keyword as an argument. This function searches the given keyword as a hashtag and likes the posts by taking the mouse to the location with a heart image (like button) and clicking on it.&nbsp;<br><\/p>\n\n\n\n<p>You can use the snippet tools to crop this image from the twitter page and save it in the same folder as the python file. Also, this page automatically scrolls down to load new tweets until interrupted.<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def like_tweet(self,entry3):\n\tbot=self.bot\n        #search the twitter with the hashtag keyword\n\tbot.get('https:\/\/twitter.com\/search?q='+str(\"%23\" + entry3)+'&amp;src=typed_query')\n\t\t\n\twhile True:\n\t\t#locate like button on screen\t\n\t\tif pyautogui.locateCenterOnScreen('1.png'):\n                        #click on like button         \n\t\t\tpyautogui.click(pyautogui.locateCenterOnScreen('1.png'),duration=1)\n\t\telse:\n                       #move cursor to the top of screem\n\t\t\tpyautogui.moveTo(650,150)\n\t\t\tpyautogui.scroll(-25)#scroll down\n\t\t\ttime.sleep(1)<\/code><\/pre>\n\n\n\n<p>Here is the code for the whole script:<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from selenium import webdriver\nfrom selenium.webdriver.common.keys import Keys\nimport time\nimport pyautogui\nfrom tkinter import *\n\n\n\nclass twitter_bot:\n\tdef __init__(self,username,password):\n\t\tself.username=username\n\t\tself.password=password\n\t\tself.bot=webdriver.Firefox()\n\n\n\tdef login(self):\n\t\tbot=self.bot\n\t\tbot.get('https:\/\/twitter.com\/')\n\t\ttime.sleep(5)\n\t\temail=bot.find_element_by_name('session&#91;username_or_email]')\n\t\tpassword=bot.find_element_by_name('session&#91;password]')\n\t\temail.clear()\n\t\tpassword.clear()\n\t\temail.send_keys(self.username)\n\t\tpassword.send_keys(self.password)\n\t\tpassword.send_keys(Keys.RETURN)\n\t\ttime.sleep(10)\n\n\n\tdef like_tweet(self,entry3):\n\t\tbot=self.bot\n\t\tbot.get('https:\/\/twitter.com\/search?q='+str(\"%23\" + entry3)+'&amp;src=typed_query')\n\t\t\n\t\twhile True:\n\t\t\t#use the indentation as shown in last code block\n\t\t\tif pyautogui.locateCenterOnScreen('1.png'):\n\t\t\t\tpyautogui.click(pyautogui.locateCenterOnScreen('1.png'),duration=1)\n\t\t\telse:\n\t\t\t\tpyautogui.moveTo(650,150)\n\t\t\t\tpyautogui.scroll(-25)\n\t\t\t\ttime.sleep(1)\n\t\t\t\n\t\t\t\n\t\t\n\n\ndef execute():\n\tlog=twitter_bot(str(entry1.get()),str(entry2.get()))\n\tlog.login()\n\tlog.like_tweet(entry3.get())\n\n\n\nwindow=Tk()\nwindow.geometry(\"700x200\")\nemails=Label(window,text=\"Enter your email here\",font='times 24 bold')\nemails.grid(row=0,column=0)\nentry1=Entry(window)\nentry1.grid(row=0,column=6)\n\n\npassword=Label(window,text=\"Enter your password here\",font='times 24 bold')\npassword.grid(row=2,column=0)\nentry2=Entry(window,show=\"*\")\nentry2.grid(row=2,column=6)\n\n\nhashtag=Label(window,text=\"Enter the seach keyword here\",font='times 24 bold')\nhashtag.grid(row=3,column=0)\nentry3=Entry(window)\nentry3.grid(row=3,column=6)\n\nb1=Button(window,text=\" GO \",command=execute,width=12,bg='grey')\nb1.grid(row=6,column=0)\nwindow.mainloop()\n<\/code><\/pre>\n\n\n\n<p>This brings us to the end of this tutorial where we created a twitter bot that can like posts for you related to a hashtag.<br><\/p>\n\n\n\n<p>Learn python from expert faculty under <a href=\"https:\/\/www.mygreatlearning.com\/pg-program-artificial-intelligence-course\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Great Learning\u2019s PG program in Artificial Intelligence and Machine Learning (opens in a new tab)\">Great Learning\u2019s PG program in Artificial Intelligence and Machine Learning<\/a>. You do not need any prior technical background to pursue this course and understand python's functioning.<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contributed by - Harshit Roy What is a twitter bot Setup Requirements Creating the GUI Creating the bot What is a Twitter Bot Twitter bots are automated user accounts that interact with Twitter using an application programming interface (API). These bots are programmed to perform tasks normally associated with human interaction such as: &nbsp;following users, [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":14935,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25860],"tags":[36796,36805],"content_type":[],"class_list":["post-14907","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-python","tag-python-project"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Twitter Bot: How to Create Twitter Bot for Auto Like?<\/title>\n<meta name=\"description\" content=\"Twitter Bot: Twitter auto liker bot automates the process of liking posts on twitter that are related to a specific hashtag or keyword. Know how to create it?\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to build your own Twitter Auto Liker bot | How to Create Twitter Bot\" \/>\n<meta property=\"og:description\" content=\"Twitter Bot: Twitter auto liker bot automates the process of liking posts on twitter that are related to a specific hashtag or keyword. Know how to create it?\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-13T06:04:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-30T18:51:32+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"700\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/twitter-bot\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/twitter-bot\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"How to build your own Twitter Auto Liker bot | How to Create Twitter Bot\",\"datePublished\":\"2020-05-13T06:04:00+00:00\",\"dateModified\":\"2025-01-30T18:51:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/twitter-bot\\\/\"},\"wordCount\":915,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/twitter-bot\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/bot.jpg\",\"keywords\":[\"python\",\"Python Project\"],\"articleSection\":[\"IT\\\/Software Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/twitter-bot\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/twitter-bot\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/twitter-bot\\\/\",\"name\":\"Twitter Bot: How to Create Twitter Bot for Auto Like?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/twitter-bot\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/twitter-bot\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/bot.jpg\",\"datePublished\":\"2020-05-13T06:04:00+00:00\",\"dateModified\":\"2025-01-30T18:51:32+00:00\",\"description\":\"Twitter Bot: Twitter auto liker bot automates the process of liking posts on twitter that are related to a specific hashtag or keyword. Know how to create it?\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/twitter-bot\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/twitter-bot\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/twitter-bot\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/bot.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/bot.jpg\",\"width\":1000,\"height\":700,\"caption\":\"twitter bot\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/twitter-bot\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IT\\\/Software Development\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/software\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to build your own Twitter Auto Liker bot | How to Create Twitter Bot\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Twitter Bot: How to Create Twitter Bot for Auto Like?","description":"Twitter Bot: Twitter auto liker bot automates the process of liking posts on twitter that are related to a specific hashtag or keyword. Know how to create it?","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/","og_locale":"en_US","og_type":"article","og_title":"How to build your own Twitter Auto Liker bot | How to Create Twitter Bot","og_description":"Twitter Bot: Twitter auto liker bot automates the process of liking posts on twitter that are related to a specific hashtag or keyword. Know how to create it?","og_url":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2020-05-13T06:04:00+00:00","article_modified_time":"2025-01-30T18:51:32+00:00","og_image":[{"width":1000,"height":700,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot.jpg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"How to build your own Twitter Auto Liker bot | How to Create Twitter Bot","datePublished":"2020-05-13T06:04:00+00:00","dateModified":"2025-01-30T18:51:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/"},"wordCount":915,"commentCount":2,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot.jpg","keywords":["python","Python Project"],"articleSection":["IT\/Software Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/","url":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/","name":"Twitter Bot: How to Create Twitter Bot for Auto Like?","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot.jpg","datePublished":"2020-05-13T06:04:00+00:00","dateModified":"2025-01-30T18:51:32+00:00","description":"Twitter Bot: Twitter auto liker bot automates the process of liking posts on twitter that are related to a specific hashtag or keyword. Know how to create it?","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot.jpg","width":1000,"height":700,"caption":"twitter bot"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/twitter-bot\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"IT\/Software Development","item":"https:\/\/www.mygreatlearning.com\/blog\/software\/"},{"@type":"ListItem","position":3,"name":"How to build your own Twitter Auto Liker bot | How to Create Twitter Bot"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot.jpg",1000,700,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot-150x150.jpg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot-300x210.jpg",300,210,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot-768x538.jpg",768,538,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot.jpg",1000,700,false],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot.jpg",1000,700,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot.jpg",1000,700,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot.jpg",640,448,false],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot.jpg",96,67,false],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/05\/bot.jpg",150,105,false]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":2,"uagb_excerpt":"Contributed by - Harshit Roy What is a twitter bot Setup Requirements Creating the GUI Creating the bot What is a Twitter Bot Twitter bots are automated user accounts that interact with Twitter using an application programming interface (API). These bots are programmed to perform tasks normally associated with human interaction such as: &nbsp;following users,&hellip;","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/14907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=14907"}],"version-history":[{"count":14,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/14907\/revisions"}],"predecessor-version":[{"id":104076,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/14907\/revisions\/104076"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/14935"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=14907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=14907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=14907"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=14907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}