我想收到离线(看不见)脸书的消息。但是我收到了这个错误。 facebook不支持此功能吗?
org.jivesoftware.smackx.OfflineMessageManager.getMessages(OfflineMessageManager.java:210)中未实现的功能(501) 在ktg_msn.test.main(test.java:58)
我的代码
try {
ConnectionConfiguration config = new ConnectionConfiguration("chat.facebook.com", 5222, "chat.facebook.com");
config.setSendPresence(false);
XMPPConnection connection = new XMPPConnection(config);
connection.connect();
connection.login("userrr", "passs");
OfflineMessageManager offlineManager = new OfflineMessageManager(connection);
System.out.println(offlineManager.getMessageCount());
Iterator<Message> it = offlineManager.getMessages();
while (it.hasNext()) {
Message m = it.next();
String fromName = m.getFrom();
Date currentDate = new Date();
String text = m.getBody() + " (offline)";
System.out.println(text);
}
} catch (XMPPException ex) {
Logger.getLogger(test.class.getName()).log(Level.SEVERE, null, ex);
}