{"id":23485440,"url":"https://github.com/rbrahul/twitter-bot","last_synced_at":"2025-06-16T14:08:15.736Z","repository":{"id":88296078,"uuid":"82640674","full_name":"rbrahul/Twitter-bot","owner":"rbrahul","description":"Twitter bot which waits for #hashTag and sends weather update of city via tweets","archived":false,"fork":false,"pushed_at":"2017-02-21T07:32:21.000Z","size":361,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T01:40:02.187Z","etag":null,"topics":["ai","bot","database","hashtag","mysql","nodejs","tweets","tweets-monitoring","twitter-application","twitter-bot","twitter-weather","weather"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbrahul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-21T05:39:58.000Z","updated_at":"2024-12-07T19:54:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"a10727cb-977d-4b77-9e15-a5aaf396fff4","html_url":"https://github.com/rbrahul/Twitter-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rbrahul/Twitter-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrahul%2FTwitter-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrahul%2FTwitter-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrahul%2FTwitter-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrahul%2FTwitter-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbrahul","download_url":"https://codeload.github.com/rbrahul/Twitter-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrahul%2FTwitter-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260173800,"owners_count":22969868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","bot","database","hashtag","mysql","nodejs","tweets","tweets-monitoring","twitter-application","twitter-bot","twitter-weather","weather"],"created_at":"2024-12-24T22:13:04.850Z","updated_at":"2025-06-16T14:08:15.708Z","avatar_url":"https://github.com/rbrahul.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twitter-weather-update-bot\r\nA Twitter bot which waits for #hashTag and sends weather update of city via tweets to the user\r\n\r\n#How it Works\r\n\r\n### Step 1:\r\nUser tweets to get weather update using hashTag **#DhakaWeather**  such as:\r\n\r\n![Seeking Weather Update of Dhaka](https://raw.githubusercontent.com/rbrahul/Twitter-weather-update-bot/master/public/images/Seeking-weather-update.png \"Seeking Weather Update of Dhaka\")\r\n\r\n\r\n### Step 2:\r\nThe twiter weather BOT always filters hashTag **#DhakaWeather**. And when ueser tweets this hastag ths BOT automatically responds him back with Weather information. For Example:\r\n\r\n![Twitter Weather BOT responded back with information to the user](https://raw.githubusercontent.com/rbrahul/Twitter-weather-update-bot/master/public/images/twitter-bot-respone.png \"Twitter Weather BOT responded back with information to the user\")\r\n\r\n#Tweets Monitoring\r\nYou can see all the tweets and response to tweets with their details in Tweets Monitoring panel. (Page Refreshing needed, Ajax not Implemented)\r\n\r\n\r\n![Twitter Weather BOT keeps trak of all the tweets to monitor](https://raw.githubusercontent.com/rbrahul/Twitter-weather-update-bot/master/public/images/screenshot-of-posts.png \"Twitter Weather BOT keeps trak of all the tweets to monitor\")\r\n\r\n#### Detail view of tweets \r\n\r\n![Tweet details view to get more information](https://raw.githubusercontent.com/rbrahul/Twitter-weather-update-bot/master/public/images/post-details.png \"weet details view to get more information\")\r\n\r\n#Installation\r\n\r\n### Create a Twitter Application\r\nGo to https://apps.twitter.com/ and create a new Application. Then you will get consumer key, secret and access_token\r\n\r\n\r\n### Get Weather API Key:\r\nGo to http://openweathermap.org/appid. If you don't have account yet you need to sign up to get free API Key. Their's APIs are really awesome. Don't hasitate.\r\n\r\n### Create MySQL Database:\r\nCreate a mysql database named as **twitter_bot**. or anything else. Then import the database schema from **database.sql** file from your project root directory.\r\n\r\n####Change Configuration:\r\nAfter completing above steps please change the configuration file with your own App specific Information\r\nIn **src\\utils\\config.js**:\r\n\r\n```js\r\nmodule.exports.tweeterConfig = {\r\n    consumer_key: 'YOUR_consumer_key',\r\n    consumer_secret: 'YOUR_consumer_secret',\r\n    access_token_key: 'YOUR_access_token_key',\r\n    access_token_secret: 'YOUR_access_token_secret'\r\n};\r\n\r\n\r\nmodule.exports.database = {\r\n    host: 'localhost',\r\n    user: 'root', // replace the user name with your own\r\n    password: 'YOUR_DB_PASSWORD', // replace the password with your own\r\n    database: 'twitter_bot'\r\n};\r\n\r\nmodule.exports.APILocationInfo = {\r\n    weatherAPIKEY: '240fae0e48fd82c8f35f6657c96496e4',\r\n    hashTag: '#DhakaWeather', // you may replace it with your own\r\n    cityID: '1337179', //This id denotes Dhaka, Bangladesh. To replace with your one get it from openweather.org\r\n    cityNamye: 'Dhaka' // This City Name will be used when response back to the tweets. You may change it\r\n};\r\n```\r\n\r\n###Final Stage:\r\nI think you have successfully configured these information. If everything goes well run following line in your Terminal or Command Line Tools from project directory:\r\n\r\n```sh\r\n$ npm start\r\n```\r\nThen go to [http://localhost:3000](http://localhost:3000) and visit. At first you will get a blank table. But when someone tweets using your **#hashTag** the system will response him back and save to your database.\r\nYou have to refresh your page to see the lates tweets.\r\n\r\n#Note\r\nTwitter application has some strict rules. As a result your app may be down for a short period while developing if you restart your server freequently or execute your twitter connection related codes.\r\nIf you find any error related to status then read the twitter [API Error and Response Status](https://dev.twitter.com/overview/api/response-codes) document. \r\n\r\n\r\n**Developed with ♥ using Nodejs,Express, MySQL, Jquery, Nunjuck**\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbrahul%2Ftwitter-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbrahul%2Ftwitter-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbrahul%2Ftwitter-bot/lists"}