collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: BeBot all a Twitter  (Read 13922 times)

0 Members and 1 Guest are viewing this topic.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
BeBot all a Twitter
« on: April 10, 2008, 09:14:08 pm »
And org member tossed out the suggestion of getting raid alerts on his phone via SMS. I couldn't think of a way to do it, too many different SMS gateways and what not.

A few months later it struck me while I was playing with Twitter...PHP should be able to post messages to Twitter, and Twitter can send alerts via SMS...

So I created this module. You can configure a Twitter username and password and then post to that Twitter account from in game using the tweet command.

You can also view the latest 20 tweets from the bot's account or other Twitter accounts using the twitter command.

Commands
tweet <message>: Add <message> to Twitter.com.
twitter: Display the last 20 tweets for the configured Twitter.com account.
twitter <username>: Display the last 20 tweets for <username>.

Requirements
The TwitterPHP class requires PHP5, thus this module requires PHP5.

To post to Twitter, you have to configure a twitter username/password via BeBot's settings interface.

Examples
AO Sentinels on Twitter.com.
Campalot on Twitter.com.

Download
BeBotTwitter_2.0.0.zip
« Last Edit: April 22, 2008, 05:43:09 am by Glarawyn »

Offline Snarfblatt

  • BeBot User
  • **
  • Posts: 63
  • Karma: +0/-0
Re: BeBot all a Twitter
« Reply #1 on: April 15, 2008, 05:37:05 pm »
I was going to try this out but it appears that curl is not in the BeBot distribution of php or at least my version which is 5.1.4. Do you know if curl is enabled in the 5.2.3 version? or any tips on how to enable curl in windows?

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: BeBot all a Twitter
« Reply #2 on: April 16, 2008, 02:58:00 am »
Grab the full PHP distribution from http://www.php.net/downloads.php, use the zip file version. Replace the BeBot PHP with this PHP distribution...

This site has Windows binaries for cURL, I don't know if you need them.
http://curl.haxx.se/download.html

From there, search google for php5, windows, and curl and you'll find a bunch of info.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: BeBot all a Twitter
« Reply #3 on: April 16, 2008, 03:08:57 am »
Download finished, PHP5 zip file from php.net definitly has the lib_curl.dll extension.

Offline Snarfblatt

  • BeBot User
  • **
  • Posts: 63
  • Karma: +0/-0
Re: BeBot all a Twitter
« Reply #4 on: April 16, 2008, 05:02:04 pm »
Thanks started going down the full php path yesterday. I'll test things out after the servers come back up.

Offline Snarfblatt

  • BeBot User
  • **
  • Posts: 63
  • Karma: +0/-0
Re: BeBot all a Twitter
« Reply #5 on: April 16, 2008, 05:28:45 pm »
Success! In case anyone else tries it out, you just need to install the full php distro like Glara mentioned and then change the "php_extension" setting in the php.ini file in the BeBot directory and add the php_curl.dll to the "extensions" list.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: BeBot all a Twitter
« Reply #6 on: April 17, 2008, 12:31:53 am »
Campalot is running a slightly different version of the module that provides a function similar to send_output() so that raid alerts are automatically posted on Twitter. People seem to like it.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: BeBot all a Twitter
« Reply #7 on: April 22, 2008, 05:47:07 am »
Futzed with it a bit.

  • Moved the twitterPHP.php file from Sources/ to custom/
  • Created a core module.

Using TwitterCore functions in your modules:
Send an update to Twitter.com:
$this -> bot -> twitter -> send_update($message);

Retrieve a user's timeline:
$this -> bot -> twitter -> user_timeline($username);

Happy twittering.

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 226
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal