Hello Gennady , thanx a bunch for all the help you are sharing on your topics , whatever i’m running out of time & means
i’ve developped a class which is supposed to interact with facebook following what you’ve said , ( I have successfully done the stuff for GTALK) but i really need to come over the facebook challenge , well here is my source code , if you have any notice please keep me up to date guys
actually , i’ve used the MD5 class given above : mysalsdigestmd5mechanism.class
PLEAASE HELP
**import org.jivesoftware.smack.RosterEntry; **
import
**import org.jivesoftware.smack.XMPPException; **
import
org.jivesoftware.smack.packet.Message;
public
/**
*/
// **TODO Auto-generated method stub **
// peut etre un probleme au niveau des utilisateurs
FacebookChat(
}
{
//FACEBOOK AUTHENTIFICATION
SASLAuthentication.registerSASLMechanism(
ConnectionConfiguration config =
XMPPConnection connection =
connection.connect();
}
// **TODO Auto-generated catch block **
e4.printStackTrace();
}
connection.login(username, password);
}
// **TODO Auto-generated catch block **
e3.printStackTrace();
}
// user name should not contain @chat…
// TRUE POUR FACEBOOK , FALSE POUR GTALK , en fait facebook uses MD5 , pas GTALK plain authentification
// config.setSASLAuthenticationEnabled(true);
connection.connect();
}
// **TODO Auto-generated catch block **
e2.printStackTrace();
}
/* Connect to the XMPP server */
connection.login(username,password);
}
// **TODO Auto-generated catch block **
e1.printStackTrace();
}
/* Login to the IM service */
Chat chat = connection.getChatManager().createChat(destination,
chat.sendMessage(message);
}
// **TODO Auto-generated catch block **
e.printStackTrace();
}
/* Send the message */
connection.disconnect() ;
//Disconnect 8
}
__public __void processMessage(Chat chat,Message message) /*Callback method from MessageListener interface . It is called when a message is received */ ____
{
System.
}
}
Youssef
out.println("Received message: " + message.getBody());
catch (XMPPException e) {
try {
new SimpleTalking());
catch (XMPPException e1) {
try {
catch (XMPPException e2) {
try {
catch (XMPPException e3) {
try {
catch (XMPPException e4) {
try {
new XMPPConnection(config);
new ConnectionConfiguration(“chat.facebook.com”, 5222);
“DIGEST-MD5”, MySASLDigestMD5Mechanism.class);
public static void FacebookChat(String username , String password , String destination , String message )
sender@domain.com,“Password”,Destinator@domain.com,“Yes !! it’s done ;)”);
Best regardss
public static void main(String[] args) {
class SimpleTalking implements MessageListener {
import org.jivesoftware.smack.XMPPConnection;
org.jivesoftware.smack.SASLAuthentication;
import org.jivesoftware.smack.Roster;
import org.jivesoftware.smack.MessageListener;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.Chat;
import java.io.*;
import java.util.*;