Twitter Bot
This is a simple bot to search and response twits.
Follow this to install and test this bot.
------ Link to the Twitter Bot Post ---------
First of all we need to access Twitter API.
With this API, you can:
- Retweet other tweets
- Retweet and edit tweets
- Search Tweets on Twitter
- and simply Create Tweets
First, you’ll need a Twitter account to get access to an API Key (Consumer Key).
1. Create a free Twitter user account
Head over to Twitter.com and register for a free account. This will allow you to access the Twitter developer portal next.
2. Head over to the Twitter Dev Site and Create a New Application
Navigate to developer.twitter.com, sign in, and create a new application.
After that, fill out all the app details and voilá...
**A*ccess token will be invalidated if a user explicitly revokes an application in their Twitter account settings or if Twitter suspends an application
You now should be able to access all the required API Keys and authorization credentials.
You should be able to find everything under the “Keys and Access Tokens” Tab for all the Twitter API Key details.
Now that you have a Twitter API Key and all the required credentials, let’s learn how to connect to the API.
How to Connect to the Twitter API
At this point we need to enter the matrix.
This is the repo → link to the public repo lab-botTwitter
Config Twitter credentials API**:**
Se setean los strings de búsqueda y las respuestas a los mismos
Al ejecutar el script se elige un string de búsqueda de manera aleatoria. Y se consulta la api para encontrar twits que macheen.
This is an example to print the search results
How to post the response
- You shall not spam
- You shall not make advisements
- You shall not execute more than two or three times per day
Run it whit
composer install
php -S localhost:8080






