I am using servlets to send & receive chat messages to facebook using smack . In that user's "A" & "B" are chating with user "C". If user "C" send's message only to "A" ,that message also received by "B". How to differenciate the messages between users?
finally my problem is ,to whom the message is cmg from facebook.
By using below code to get messages:
public void processMessage(Chat chat, Message message) {
if ((message != null) && (message.getBody() != null)) {
System.out.println(chat.getParticipant() +"--"+ message.getBody());
}
}