Google Talk Status API in PHP

5 02 2009

I just put together this API in PHP for retrieving the online status of a Google Talk user. It’s based on the Google Talk badge but allows for server-side access to a user’s status.

Why would someone need such a thing? Well, let’s say they wanted to create a badge controller which checks a number of users to see if they’re online, and when it finds one, it displays the badge for that user. This controller can then serve as a live help module to place on a web site to allow site visitors to talk with any available representative. If no rep is available, the controller can disappear seamlessly, or display a link to a contact form or help/faqs pages.

Download gtalkStatus.class.php
Download checkSkype.class.php, a modified phpclasses file for checking a Skype user’s status. Skype is, to date, much more friendly for allowing APIs to access a user’s status.

About these ads

Actions

Information

13 responses

11 03 2009
almas

Hello,

In google talk status class(gtalkStatus.class.php, what is the account hash of almasbd@gmail.com?

Please let me know. Thanks in advanced.

Regards

Almas Hossain

11 03 2009
israelwebdev


* 2- To create your chatback badge, visit http://www.google.com/talk/service/badge/New. If you’re using a Google Apps account, you can create a chatback badge by visiting http://www.google.com/talk/service/a/DOMAIN/badge/New where DOMAIN is the name of your domain.
* 3- Use the alphanumeric account hash to seed the constructor

5 04 2009
Adam Harvey

Thanks for posting this. It was easy to use and worked great. I used it for a Flash piece here . Do you know if there is any way to set your Google Talk status remotely? I’m looking for a way to update my status “busy” or “available” without using GMail or GTalk. Any ideas?
Keep up the good work,
Adam

5 04 2009
israelwebdev

You can check out http://code.google.com/p/xmpphp/
You should be able to connect to the Google server and set your “presence”. Not sure if this will cause a collision if you have a session open on another client, but try it out.

16 04 2009
Veerendra

My website wants to generate google chatback badge code for the user instead of user going to the google chatback website and copying paste to my site.
I would like to acheive this programmically login to google with google id and generating the chatback bacdge code.
Can you please let me know how it can be acheived?

16 04 2009
israelwebdev

I don’t know about any API to do this. Sorry

3 05 2009
Prateek

Is there a way to get Gtalk Friend’s Status as Feed

3 05 2009
israelwebdev

Again, I don’t have much experience, but check out the XMPPHP project. Should be able to do it.

26 05 2009
ktirumula

I want to show gmail user status in my web page only i have gmail user ID nothing else how can do that

26 05 2009
israelwebdev

If you’re looking to simply show your status in your web page, you can use the Badge generated by Google by visiting the Google Talk badge page, and following the instructions there.

26 03 2011
Victor

Hi,

Is it okey if I use your script in a WordPress plugin? And can I credit you if I upload it to WordPress.com plugin repository?

Best regards
Victor, Intervaro Web Agency

27 03 2011
israelwebdev

Sure Victor. I expect the settings page will include a link to the badge-generation page, and make the config easy. (Read the class comments for more info)

What’s the complete functionality of the plugin? Something like the scenario I described in this article?

27 03 2011
Victor

Hi Israelwebdev,

The plugin should have similar functionality as another WordPress plugin using your script – Google Talk Chatback Widget (http://wordpress.org/extend/plugins/google-talk-chatback-wordpress-widget/).
The goal is to make it more customizable and easier to use. Besides support for WordPress widgets you will also be able to use shortcodes or template tags.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

Join 261 other followers

%d bloggers like this: