Skip to content

Instantly share code, notes, and snippets.

@bdunagan
Created October 29, 2011 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdunagan/1324585 to your computer and use it in GitHub Desktop.
Save bdunagan/1324585 to your computer and use it in GitHub Desktop.
Invite users from Google Talk using Ruby and Jabber
# https://github.com/ln/xmpp4r
# gem install xmpp4r
require 'xmpp4r'
email = ADD_EMAIL
password = ADD_PASSWORD
friends_email = ADD_EMAIL
client = Jabber::Client::new(Jabber::JID::new(email))
client.connect("talk.google.com")
client.auth(password)
client.send(Jabber::Presence.new.set_type(:subscribe).set_to(friends_email))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment