Created
October 29, 2011 15:25
-
-
Save bdunagan/1324585 to your computer and use it in GitHub Desktop.
Invite users from Google Talk using Ruby and Jabber
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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