Created
February 8, 2012 16:46
Revisions
-
nixmaniack revised this gist
Feb 8, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ raise IOError('Can not auth with server') # use following to get list of contacts C.sendInitPresence(requestRoster=1) #rosterobject = C.getRoster() # I used the following loop just to check my contacts, it's not need if you know the ID #for i in rosterobject.getItems(): -
nixmaniack revised this gist
Feb 8, 2012 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -7,9 +7,10 @@ raise IOError('Can not connect') if not C.auth(jid.getNode(),PASS): raise IOError('Can not auth with server') # use following to get list of contacts #C.sendInitPresence(requestRoster=1) #rosterobject = C.getRoster() # I used the following loop just to check my contacts, it's not need if you know the ID #for i in rosterobject.getItems(): # print i -
nixmaniack created this gist
Feb 8, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ import xmpp GMAIL_ID = '[email protected]' PASS = 'yourpass' # if you have app specific pass, you'll need to generate one for this jid = xmpp.protocol.JID(GMAIL_ID) C = xmpp.Client(jid.getDomain(), debug=['always']) if not C.connect(("talk.google.com",5223)): raise IOError('Can not connect') if not C.auth(jid.getNode(),PASS): raise IOError('Can not auth with server') C.sendInitPresence(requestRoster=1) rosterobject = C.getRoster() # I used the following loop just to check my contacts, it's not need if you know the ID #for i in rosterobject.getItems(): # print i C.send( xmpp.Message('[email protected]', "hello") )