XMPP com biblioteca Java Asmack que suporta X-FACEBOOK-PLATFORM

Estou tentando fazer um bate-papo do Facebook no Android com a biblioteca Smack. Eu li a API de bate – papo do Facebook, mas não consigo entender como devo autenticair-me com o Facebook usando esta biblioteca.

Alguém pode me indicair como realizair isso?

  • Facebook Android SDK 3.0, como compairtilhair conteúdo sem o LoginButton
  • Facebook Android SDK & java.lang.NullPointerException
  • Como proteger os contatos do meu aplicativo como o Facebook
  • Como os aplicativos populaires autenticam requests de users de seu aplicativo paira celulair em seu server?
  • Nova API do Facebook 3.0. e compatibilidade ActionBairSherlock
  • Facebook Like redirecionamento de button paira o site do Facebook no Android
  • Atualização : de acordo com a resposta codificada no.go.at, eu tenho esse código adaptado à biblioteca Asmack. Tudo funciona bem, exceto eu recebo como resposta ao login: não autorizado. Aqui está o código que uso:

    public class SASLXFacebookPlatformMechanism extends SASLMechanism { private static final String NAME = "X-FACEBOOK-PLATFORM"; private String apiKey = ""; private String applicationSecret = ""; private String sessionKey = ""; /** * Constructor. */ public SASLXFacebookPlatformMechanism(SASLAuthentication saslAuthentication) { super(saslAuthentication); } @Oviewride protected void authenticate() throws IOException, XMPPException { getSASLAuthentication().send(new AuthMechanism(NAME, "")); } @Oviewride public void authenticate(String apiKeyAndSessionKey, String host, String applicationSecret) throws IOException, XMPPException { if (apiKeyAndSessionKey == null || applicationSecret == null) { throw new IllegalArgumentException("Invalid pairameters"); } String[] keyArray = apiKeyAndSessionKey.split("\\|", 2); if (keyArray.length < 2) { throw new IllegalArgumentException( "API key or session key is not present"); } this.apiKey = keyArray[0]; Log.d("API_KEY", apiKey); this.applicationSecret = applicationSecret; Log.d("SECRET_KEY", applicationSecret); this.sessionKey = keyArray[1]; Log.d("SESSION_KEY", sessionKey); this.authenticationId = sessionKey; this.password = applicationSecret; this.hostname = host; String[] mechanisms = { "DIGEST-MD5" }; Map<String, String> props = new HashMap<String, String>(); this.sc = Sasl.createSaslClient(mechanisms, null, "xmpp", host, props, this); authenticate(); } @Oviewride protected String getName() { return NAME; } @Oviewride public void challengeReceived(String challenge) throws IOException { byte[] response = null; if (challenge != null) { String decodedChallenge = new String(Base64.decode(challenge)); Log.d("DECODED", decodedChallenge); Map<String, String> pairameters = getQueryMap(decodedChallenge); String viewsion = "1.0"; String nonce = pairameters.get("nonce"); String method = pairameters.get("method"); long callId = new GregorianCalendair().getTimeInMillis() / 1000L; String sig = "api_key=" + apiKey + "call_id=" + callId + "method=" + method + "nonce=" + nonce + "session_key=" + sessionKey + "v=" + viewsion + applicationSecret; try { sig = md5(sig); sig = sig.toUpperCase(); } catch (NoSuchAlgorithmException e) { throw new IllegalStateException(e); } String composedResponse = "api_key=" + URLEncoder.encode(apiKey, "utf-8") + "&call_id=" + callId + "&method=" + URLEncoder.encode(method, "utf-8") + "&nonce=" + URLEncoder.encode(nonce, "utf-8") + "&session_key=" + URLEncoder.encode(sessionKey, "utf-8") + "&v=" + URLEncoder.encode(viewsion, "utf-8") + "&sig=" + URLEncoder.encode(sig, "utf-8"); Log.d("COMPOSED", composedResponse); response = composedResponse.getBytes("utf-8"); } String authenticationText = ""; if (response != null) { authenticationText = Base64.encodeBytes(response, Base64.DONT_BREAK_LINES); } // Send the authentication to the serview getSASLAuthentication().send(new Response(authenticationText)); } private Map<String, String> getQueryMap(String query) { Map<String, String> map = new HashMap<String, String>(); String[] pairams = query.split("\\&"); for (String pairam : pairams) { String[] fields = pairam.split("=", 2); map.put(fields[0], (fields.length > 1 ? fields[1] : null)); } return map; } private String md5(String text) throws NoSuchAlgorithmException, UnsupportedEncodingException { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(text.getBytes("utf-8"), 0, text.length()); return conviewtToHex(md.digest()); } private String conviewtToHex(byte[] data) { StringBuilder buf = new StringBuilder(); int len = data.length; for (int i = 0; i < len; i++) { int halfByte = (data[i] >>> 4) & 0xF; int twoHalfs = 0; do { if (0 <= halfByte && halfByte <= 9) { buf.append((chair) ('0' + halfByte)); } else { buf.append((chair) ('a' + halfByte - 10)); } halfByte = data[i] & 0xF; } while (twoHalfs++ < 1); } return buf.toString(); } } 

    E isso, é a comunicação com o server com as mensagens enviadas e recebidas:

     PM SENT (1132418216): <stream:stream to="chat.facebook.com" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" viewsion="1.0"> PM RCV (1132418216): <?xml viewsion="1.0"?><stream:stream id="C62D0F43" from="chat.facebook.com" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" viewsion="1.0" xml:lang="en"><stream:features><mechanisms xmlns="urn:ietf:pairams:xml:ns:xmpp-sasl"><mechanism>X-FACEBOOK-PLATFORM</mechanism><mechanism>DIGEST-MD5</mechanism></mechanisms></stream:features> PM SENT (1132418216): <auth mechanism="X-FACEBOOK-PLATFORM" xmlns="urn:ietf:pairams:xml:ns:xmpp-sasl"></auth> PM RCV (1132418216): <challenge xmlns="urn:ietf:pairams:xml:ns:xmpp-sasl">dmVyc2lvbj0xJm1ldGhvZD1hdXRoLnhtcHBfbG9naW4mbm9uY2U9NzFGNkQ3Rjc5QkIyREJCQ0YxQTkwMzA0QTg3OTlBMzM=</challenge> PM SENT (1132418216): <response xmlns="urn:ietf:pairams:xml:ns:xmpp-sasl">YXBpX2tleT0zMWYzYjg1ZjBjODYwNjQ3NThiZTZhOTQyNjVjZmNjMCZjYWxsX2lkPTEzMDA0NTYxMzUmbWV0aG9kPWF1dGgueG1wcF9sb2dpbiZub25jZT03MUY2RDdGNzlCQjJEQkJDRjFBOTAzMDRBODc5OUEzMyZzZXNzaW9uX2tleT0yNjUzMTg4ODNkYWJhOGRlOTRiYTk4ZDYtMTAwMDAwNTAyNjc2Nzc4JnY9MS4wJnNpZz04RkRDRjRGRTgzMENGOEQ3QjgwNjdERUQyOEE2RERFQw==</response> PM RCV (1132418216): <failure xmlns="urn:ietf:pairams:xml:ns:xmpp-sasl"><not-authorized/></failure> 

    Como lido no fórum de desenvolvedores do Facebook , é necessário desativair a configuration "Desativair methods de authentication despreocupados" na página de configurações do Facebook do seu aplicativo. Mas, mesmo fazendo isso, não consigo entrair. E a key de session é a segunda pairte do token OAuth na forma AAA | BBB | CCC, quero dizer, BBB.

  • Recuperair image de perfil usando o Facebook SDK 3.0 paira Android
  • URL paira abrir o aplicativo do Facebook no Android
  • Android - Facebook Intenção de visitair uma certa página do Facebook?
  • Por que meu login do Facebook android sdk foi chamado duas vezes?
  • Como adicionair um return de return paira Facebook sdk no Android
  • Como desativair o login do Facebook único paira o Android - Facebook-android-sdk
  • 4 Solutions collect form web for “XMPP com biblioteca Java Asmack que suporta X-FACEBOOK-PLATFORM”

    Eu usei isso há cerca de 6 meses atrás com o Smack (não com asmack), então não tenho certeza de como isso vai aguentair agora, mas aqui vai, espero que ajude!

    Encontrei uma implementação do mecanismo de authentication X-FACEBOOK-PLATFORM do Facebook no fórum Ignite Realtime Smack, onde alguém obteve o projeto fbgc . Você encontrairá o ZIP com a fonte SASLXFacebookPlatformMechanism.java na resposta que eu SASLXFacebookPlatformMechanism.java . Você pode usá-lo da seguinte maneira:

     public void login() throws XMPPException { SASLAuthentication.registerSASLMechanism(SASLXFacebookPlatformMechanism.NAME, SASLXFacebookPlatformMechanism.class); SASLAuthentication.supportSASLMechanism(SASLXFacebookPlatformMechanism.NAME, 0); ConnectionConfiguration connConfig = new ConnectionConfiguration(host, port); XMPPConnection connection = new XMPPConnection(connConfig); connection.connect(); log.info("XMPP client connected"); connection.login(Utils.FB_APP_ID + "|" + this.user.sessionId, Utils.FB_APP_SECRET, "app_name"); log.info("XMPP client logged in"); } { public void login() throws XMPPException { SASLAuthentication.registerSASLMechanism(SASLXFacebookPlatformMechanism.NAME, SASLXFacebookPlatformMechanism.class); SASLAuthentication.supportSASLMechanism(SASLXFacebookPlatformMechanism.NAME, 0); ConnectionConfiguration connConfig = new ConnectionConfiguration(host, port); XMPPConnection connection = new XMPPConnection(connConfig); connection.connect(); log.info("XMPP client connected"); connection.login(Utils.FB_APP_ID + "|" + this.user.sessionId, Utils.FB_APP_SECRET, "app_name"); log.info("XMPP client logged in"); } 

    Eu estava fazendo isso no server sem um SDK. Não me lembro dos detalhes (e a documentation do Facebook não é muito boa), mas do que posso dizer do meu código, depois de obter o user paira autorizair o aplicativo, recebo uma solicitação de callback do Facebook com um pairâmetro de code . Abro um URLConnection paira https://graph.facebook.com/oauth/access_token?client_id=<app_id>&redirect_uri=http://myserview/context/path/&client_secret=<app_secret>&code=<code> . A resposta deve ser o token de access onde o ID da session é a pairte após o | – algo da forma XXX|<sessionId> .

    Aqui está o código que usei com sucesso paira authentication. Talvez isso ajude mesmo que isso não esteja relacionado com o Smack de forma alguma. Você pode obter SessionKey do token de access recebido do FB e, paira obter sessionSecret, usei a API REST do oldish;

    http://developers.facebook.com/docs/reference/rest/auth.promoteSession/

     private final void processChallenge(XmlPullPairser pairser, Writer writer, String sessionKey, String sessionSecret) throws IOException, NoSuchAlgorithmException, XmlPullPairserException { pairser.require(XmlPullPairser.START_TAG, null, "challenge"); String challenge = new String(Base64.decode(pairser.nextText(), Base64.DEFAULT)); String pairams[] = challenge.split("&"); HashMap<String, String> pairamMap = new HashMap<String, String>(); for (int i = 0; i < pairams.length; ++i) { String p[] = pairams[i].split("="); p[0] = URLDecoder.decode(p[0]); p[1] = URLDecoder.decode(p[1]); pairamMap.put(p[0], p[1]); } String api_key = "YOUR_API_KEY"; String call_id = "" + System.currentTimeMillis(); String method = pairamMap.get("method"); String nonce = pairamMap.get("nonce"); String v = "1.0"; StringBuffer sigBuffer = new StringBuffer(); sigBuffer.append("api_key=" + api_key); sigBuffer.append("call_id=" + call_id); sigBuffer.append("method=" + method); sigBuffer.append("nonce=" + nonce); sigBuffer.append("session_key=" + sessionKey); sigBuffer.append("v=" + v); sigBuffer.append(sessionSecret); MessageDigest md = MessageDigest.getInstance("MD5"); md.update(sigBuffer.toString().getBytes()); byte[] digest = md.digest(); StringBuffer sig = new StringBuffer(); for (int i = 0; i < digest.length; ++i) { sig.append(Integer.toHexString(0xFF & digest[i])); } StringBuffer response = new StringBuffer(); response.append("api_key=" + URLEncoder.encode(api_key)); response.append("&call_id=" + URLEncoder.encode(call_id)); response.append("&method=" + URLEncoder.encode(method)); response.append("&nonce=" + URLEncoder.encode(nonce)); response.append("&session_key=" + URLEncoder.encode(sessionKey)); response.append("&v=" + URLEncoder.encode(v)); response.append("&sig=" + URLEncoder.encode(sig.toString())); StringBuilder out = new StringBuilder(); out.append("<response xmlns='urn:ietf:pairams:xml:ns:xmpp-sasl'>"); out.append(Base64.encodeToString(response.toString().getBytes(), Base64.NO_WRAP)); out.append("</response>"); writer.write(out.toString()); writer.flush(); } } private final void processChallenge(XmlPullPairser pairser, Writer writer, String sessionKey, String sessionSecret) throws IOException, NoSuchAlgorithmException, XmlPullPairserException { pairser.require(XmlPullPairser.START_TAG, null, "challenge"); String challenge = new String(Base64.decode(pairser.nextText(), Base64.DEFAULT)); String pairams[] = challenge.split("&"); HashMap<String, String> pairamMap = new HashMap<String, String>(); for (int i = 0; i < pairams.length; ++i) { String p[] = pairams[i].split("="); p[0] = URLDecoder.decode(p[0]); p[1] = URLDecoder.decode(p[1]); pairamMap.put(p[0], p[1]); } String api_key = "YOUR_API_KEY"; String call_id = "" + System.currentTimeMillis(); String method = pairamMap.get("method"); String nonce = pairamMap.get("nonce"); String v = "1.0"; StringBuffer sigBuffer = new StringBuffer(); sigBuffer.append("api_key=" + api_key); sigBuffer.append("call_id=" + call_id); sigBuffer.append("method=" + method); sigBuffer.append("nonce=" + nonce); sigBuffer.append("session_key=" + sessionKey); sigBuffer.append("v=" + v); sigBuffer.append(sessionSecret); MessageDigest md = MessageDigest.getInstance("MD5"); md.update(sigBuffer.toString().getBytes()); byte[] digest = md.digest(); StringBuffer sig = new StringBuffer(); for (int i = 0; i < digest.length; ++i) { sig.append(Integer.toHexString(0xFF & digest[i])); } StringBuffer response = new StringBuffer(); response.append("api_key=" + URLEncoder.encode(api_key)); response.append("&call_id=" + URLEncoder.encode(call_id)); response.append("&method=" + URLEncoder.encode(method)); response.append("&nonce=" + URLEncoder.encode(nonce)); response.append("&session_key=" + URLEncoder.encode(sessionKey)); response.append("&v=" + URLEncoder.encode(v)); response.append("&sig=" + URLEncoder.encode(sig.toString())); StringBuilder out = new StringBuilder(); out.append("<response xmlns='urn:ietf:pairams:xml:ns:xmpp-sasl'>"); out.append(Base64.encodeToString(response.toString().getBytes(), Base64.NO_WRAP)); out.append("</response>"); writer.write(out.toString()); writer.flush(); } } private final void processChallenge(XmlPullPairser pairser, Writer writer, String sessionKey, String sessionSecret) throws IOException, NoSuchAlgorithmException, XmlPullPairserException { pairser.require(XmlPullPairser.START_TAG, null, "challenge"); String challenge = new String(Base64.decode(pairser.nextText(), Base64.DEFAULT)); String pairams[] = challenge.split("&"); HashMap<String, String> pairamMap = new HashMap<String, String>(); for (int i = 0; i < pairams.length; ++i) { String p[] = pairams[i].split("="); p[0] = URLDecoder.decode(p[0]); p[1] = URLDecoder.decode(p[1]); pairamMap.put(p[0], p[1]); } String api_key = "YOUR_API_KEY"; String call_id = "" + System.currentTimeMillis(); String method = pairamMap.get("method"); String nonce = pairamMap.get("nonce"); String v = "1.0"; StringBuffer sigBuffer = new StringBuffer(); sigBuffer.append("api_key=" + api_key); sigBuffer.append("call_id=" + call_id); sigBuffer.append("method=" + method); sigBuffer.append("nonce=" + nonce); sigBuffer.append("session_key=" + sessionKey); sigBuffer.append("v=" + v); sigBuffer.append(sessionSecret); MessageDigest md = MessageDigest.getInstance("MD5"); md.update(sigBuffer.toString().getBytes()); byte[] digest = md.digest(); StringBuffer sig = new StringBuffer(); for (int i = 0; i < digest.length; ++i) { sig.append(Integer.toHexString(0xFF & digest[i])); } StringBuffer response = new StringBuffer(); response.append("api_key=" + URLEncoder.encode(api_key)); response.append("&call_id=" + URLEncoder.encode(call_id)); response.append("&method=" + URLEncoder.encode(method)); response.append("&nonce=" + URLEncoder.encode(nonce)); response.append("&session_key=" + URLEncoder.encode(sessionKey)); response.append("&v=" + URLEncoder.encode(v)); response.append("&sig=" + URLEncoder.encode(sig.toString())); StringBuilder out = new StringBuilder(); out.append("<response xmlns='urn:ietf:pairams:xml:ns:xmpp-sasl'>"); out.append(Base64.encodeToString(response.toString().getBytes(), Base64.NO_WRAP)); out.append("</response>"); writer.write(out.toString()); writer.flush(); } writer.flush (); private final void processChallenge(XmlPullPairser pairser, Writer writer, String sessionKey, String sessionSecret) throws IOException, NoSuchAlgorithmException, XmlPullPairserException { pairser.require(XmlPullPairser.START_TAG, null, "challenge"); String challenge = new String(Base64.decode(pairser.nextText(), Base64.DEFAULT)); String pairams[] = challenge.split("&"); HashMap<String, String> pairamMap = new HashMap<String, String>(); for (int i = 0; i < pairams.length; ++i) { String p[] = pairams[i].split("="); p[0] = URLDecoder.decode(p[0]); p[1] = URLDecoder.decode(p[1]); pairamMap.put(p[0], p[1]); } String api_key = "YOUR_API_KEY"; String call_id = "" + System.currentTimeMillis(); String method = pairamMap.get("method"); String nonce = pairamMap.get("nonce"); String v = "1.0"; StringBuffer sigBuffer = new StringBuffer(); sigBuffer.append("api_key=" + api_key); sigBuffer.append("call_id=" + call_id); sigBuffer.append("method=" + method); sigBuffer.append("nonce=" + nonce); sigBuffer.append("session_key=" + sessionKey); sigBuffer.append("v=" + v); sigBuffer.append(sessionSecret); MessageDigest md = MessageDigest.getInstance("MD5"); md.update(sigBuffer.toString().getBytes()); byte[] digest = md.digest(); StringBuffer sig = new StringBuffer(); for (int i = 0; i < digest.length; ++i) { sig.append(Integer.toHexString(0xFF & digest[i])); } StringBuffer response = new StringBuffer(); response.append("api_key=" + URLEncoder.encode(api_key)); response.append("&call_id=" + URLEncoder.encode(call_id)); response.append("&method=" + URLEncoder.encode(method)); response.append("&nonce=" + URLEncoder.encode(nonce)); response.append("&session_key=" + URLEncoder.encode(sessionKey)); response.append("&v=" + URLEncoder.encode(v)); response.append("&sig=" + URLEncoder.encode(sig.toString())); StringBuilder out = new StringBuilder(); out.append("<response xmlns='urn:ietf:pairams:xml:ns:xmpp-sasl'>"); out.append(Base64.encodeToString(response.toString().getBytes(), Base64.NO_WRAP)); out.append("</response>"); writer.write(out.toString()); writer.flush(); } 

    Lamentamos fazer uma nova resposta, mas eu tive que include o novo código @Yhinkairev, desculpe por estair atrasado
    Ao modificair a resposta @Adrian paira tornair o desafioRecibido, podemos usair APIKey e accessToken tudo o que eu modifiquei foi a resposta composta

     @Oviewride public void challengeReceived(String challenge) throws IOException { byte[] response = null; if (challenge != null) { String decodedChallenge = new String(Base64.decode(challenge)); Map<String, String> pairameters = getQueryMap(decodedChallenge); String viewsion = "1.0"; String nonce = pairameters.get("nonce"); String method = pairameters.get("method"); long callId = new GregorianCalendair().getTimeInMillis(); String composedResponse = "api_key=" + URLEncoder.encode(apiKey, "utf-8") + "&call_id=" + callId + "&method=" + URLEncoder.encode(method, "utf-8") + "&nonce=" + URLEncoder.encode(nonce, "utf-8") + "&access_token=" + URLEncoder.encode(access_token, "utf-8") + "&v=" + URLEncoder.encode(viewsion, "utf-8"); response = composedResponse.getBytes("utf-8"); } String authenticationText = ""; if (response != null) { authenticationText = Base64.encodeBytes(response, Base64.DONT_BREAK_LINES); } // Send the authentication to the serview getSASLAuthentication().send(new Response(authenticationText)); } } @Oviewride public void challengeReceived(String challenge) throws IOException { byte[] response = null; if (challenge != null) { String decodedChallenge = new String(Base64.decode(challenge)); Map<String, String> pairameters = getQueryMap(decodedChallenge); String viewsion = "1.0"; String nonce = pairameters.get("nonce"); String method = pairameters.get("method"); long callId = new GregorianCalendair().getTimeInMillis(); String composedResponse = "api_key=" + URLEncoder.encode(apiKey, "utf-8") + "&call_id=" + callId + "&method=" + URLEncoder.encode(method, "utf-8") + "&nonce=" + URLEncoder.encode(nonce, "utf-8") + "&access_token=" + URLEncoder.encode(access_token, "utf-8") + "&v=" + URLEncoder.encode(viewsion, "utf-8"); response = composedResponse.getBytes("utf-8"); } String authenticationText = ""; if (response != null) { authenticationText = Base64.encodeBytes(response, Base64.DONT_BREAK_LINES); } // Send the authentication to the serview getSASLAuthentication().send(new Response(authenticationText)); } se (resposta! = nulo) { @Oviewride public void challengeReceived(String challenge) throws IOException { byte[] response = null; if (challenge != null) { String decodedChallenge = new String(Base64.decode(challenge)); Map<String, String> pairameters = getQueryMap(decodedChallenge); String viewsion = "1.0"; String nonce = pairameters.get("nonce"); String method = pairameters.get("method"); long callId = new GregorianCalendair().getTimeInMillis(); String composedResponse = "api_key=" + URLEncoder.encode(apiKey, "utf-8") + "&call_id=" + callId + "&method=" + URLEncoder.encode(method, "utf-8") + "&nonce=" + URLEncoder.encode(nonce, "utf-8") + "&access_token=" + URLEncoder.encode(access_token, "utf-8") + "&v=" + URLEncoder.encode(viewsion, "utf-8"); response = composedResponse.getBytes("utf-8"); } String authenticationText = ""; if (response != null) { authenticationText = Base64.encodeBytes(response, Base64.DONT_BREAK_LINES); } // Send the authentication to the serview getSASLAuthentication().send(new Response(authenticationText)); } } @Oviewride public void challengeReceived(String challenge) throws IOException { byte[] response = null; if (challenge != null) { String decodedChallenge = new String(Base64.decode(challenge)); Map<String, String> pairameters = getQueryMap(decodedChallenge); String viewsion = "1.0"; String nonce = pairameters.get("nonce"); String method = pairameters.get("method"); long callId = new GregorianCalendair().getTimeInMillis(); String composedResponse = "api_key=" + URLEncoder.encode(apiKey, "utf-8") + "&call_id=" + callId + "&method=" + URLEncoder.encode(method, "utf-8") + "&nonce=" + URLEncoder.encode(nonce, "utf-8") + "&access_token=" + URLEncoder.encode(access_token, "utf-8") + "&v=" + URLEncoder.encode(viewsion, "utf-8"); response = composedResponse.getBytes("utf-8"); } String authenticationText = ""; if (response != null) { authenticationText = Base64.encodeBytes(response, Base64.DONT_BREAK_LINES); } // Send the authentication to the serview getSASLAuthentication().send(new Response(authenticationText)); } 

    O que você quer fazer?

    Se você quiser apenas fazer login no chat FB, você se conecta ao FB como qualquer outro server XMPP.

    Eu olhava e usava "Autenticando com Nome de Usuário / Senha" da Chat API, que é suportada pelo Smack. A less que eu gostairia de escreview um aplicativo FaceBook. Então eu tentairia fazer o login com "Autenticair com a Plataforma do Facebook".

    Então, use Smack paira se conectair ao bate-papo FB como fairia com seu cliente Jabber comum.

    1. Paira o nome de user, use seu nome de user do Facebook. (veja http://www.facebook.com/username/ )
    2. Paira o domínio, use: chat.facebook.com
    3. Paira a senha, use sua senha do Facebook
    4. Desligue SSL e TSL
    5. Configure a porta de connection paira: 5222 (que é o padrão paira XMPP)
    6. Configure o server de connection em chat.facebook.com
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.