Programming a twitter bot/search tool

Associate
Joined
8 May 2009
Posts
296
I have about 12 twitter accounts (don't ask!) ... but to explain, I manage a band's social media, and also in the process of trying to set up a forum.

For a long time I've wanted to set up a twitter tool which allows stuff like:

- Searching for certain groups/tweets/people
- Showing relationships between different accounts
- Suggesting people

However, primarily it will be used for:

- Automatically following certain people who tweet a certain word or phrase... no exact science, just to build a following

- Scheduling of tweets

...............................................
...................................
.........................
..............
....
.

In my brief research I've found tools like this. One of which is free for 10 tweets, the others charge.

I'm a newbie to python but within a day I got it tweeting and searching things. But I'd rather use PHP as I am far more used to that, plus also can use databases/my Linux server to build it into a more dynamic tool.

Can anyone tell me how much of a challenge I face with all this?

I bought the domain http://www.twintel.co.uk to run it off - it's for my own use, but wondered if in time I could open it up to donations (not business).

Thanks everyone,
Redrabbit
 
Would it even be possible with PHP? I always took it to be a language for websites/databases bot so much bots or web scraping

If it was me I'd be looking at writing the bot in Python and use PHP along side it for the database/website side of things
 
Of course you could use PHP, Twitter has a PHP API so posting etc is easy peasy on that side.

You would create an App on Twitter Dev (https://dev.twitter.com/) then you do some coding to store Access Keys etc, And then you can access the accounts twitter for posting etc through your App. (Workflow tends to be, Go to your site -> Signup -> Forward to Github to allow access to App -> App redirects back to your site with the access keys etc)

Web scraping can be done, Just googling there is plenty of classes to help, This was the top result for github https://github.com/FriendsOfPHP/Goutte

Scheduling of tweets easy, Make a database of tweets and a publication date, And make a script that would be run from the command line and add it to your servers Crontab to check every 5 minutes for any new tweets to post.
 
Back
Top Bottom