Link to home
Start Free TrialLog in
Avatar of soapergem
soapergemFlag for United States of America

asked on

Net-XMPP / Google Talk

Could someone who knows Perl much better than I give me a code snippet that uses the Net-XMPP package to connect to Google Talk, send a message, and then disconnect? So far I haven't even been able to connect, let alone send a message. I've used the code shown below, but when I execute it, after a bit of waiting, it returns an error message: "No SASL mechanism found". Also, I understand well what the hostname, username, and password are, but what on earth is the "resource" parameter?

    #!/usr/local/bin/perl
    use Net::XMPP;
   
    $Con = new Net::XMPP::Client();
   
    $Con->Execute(hostname=>"talk.google.com",
        username=>"username@gmail.com",
        password=>"password",
        resource=>"i don't know what this means"
    );
   
    $Con->Disconnect();
Avatar of nedfine
nedfine
Flag of India image

please ensure that the following modules are installed
IO ::Socket ::SSL (>=0.81 ?)
XML ::Stream
Net ::XMPP
Authen ::SASL

not too sure abt this.
Avatar of soapergem

ASKER

Those modules are installed. (Sorry for the delay in responding, by the way.) Now, about the question: what does the "resource" variable do? And how would I properly code something to send a message?
ASKER CERTIFIED SOLUTION
Avatar of javanesevn
javanesevn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial