Autenticación X-FACEBOOK-PLATFORM con la biblioteca SMACK Java usando OAuth 2.0

Primera publicación aquí, así que sé amable. Estoy creando un cliente de chat de Facebook, usando la biblioteca Smack. Estoy usando el método X-FACEBOOK-PLATFORM para no guardar ninguna contraseña. Lo hice funcionar correctamente usando oauth 1.0, y quiero cambiarlo a 2.0, debido a la fecha límite del 1 de octubre; p. Por lo que entiendo, lo único que tendría que hacer para migrar a 2.0 es eliminar los parámetros "sig" y "session_key" y agregar un parámetro "access_token", pero obtengo un "SASL autenticación X-FACEBOOK- PLATAFORMA fallida: no autorizado: ". Estoy usando esta clase de SASLMechanism personalizada:

package smackresearching;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Map;

import javax.security.sasl.Sasl;

import org.jivesoftware.smack.SASLAuthentication;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.sasl.SASLMechanism;
import org.jivesoftware.smack.util.Base64;

public class SASLXFacebookPlatformMechanism extends SASLMechanism {

    public static final String NAME = "X-FACEBOOK-PLATFORM";
    private String apiKey = "";
        private String accessToken = "";


    /**
     * Constructor.
     */
    public SASLXFacebookPlatformMechanism(SASLAuthentication saslAuthentication) {
            super(saslAuthentication);
    }

    @Override
    protected void authenticate() throws IOException, XMPPException {
        // Send the authentication to the server
        getSASLAuthentication().send(new AuthMechanism(getName(), ""));
    }

    @Override
    public void authenticate(String apiKey, String host, String accessToken) throws IOException, XMPPException {
        this.apiKey = apiKey;
        this.accessToken = accessToken;
        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();
    }

    @Override
    protected String getName() {
            return NAME;
    }

    @Override
    public void challengeReceived(String challenge) throws IOException {
        byte[] response = null;

        if (challenge != null) {
                    String decodedChallenge = new String(Base64.decode(challenge));
                    Map<String, String> parameters = getQueryMap(decodedChallenge);

                    String version = "1.0";
                    String nonce = parameters.get("nonce");
                    String method = parameters.get("method");

                    long callId = new GregorianCalendar().getTimeInMillis() / 1000L;

                    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(accessToken, "utf-8")
                                                                            + "&v=" + URLEncoder.encode(version, "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 server
        getSASLAuthentication().send(new Response(authenticationText));
    }

    private Map<String, String> getQueryMap(String query) {
            Map<String, String> map = new HashMap<String, String>();
            String[] params = query.split("\\&");

            for (String param : params) {
                    String[] fields = param.split("=", 2);
                    map.put(fields[0], (fields.length > 1 ? fields[1] : null));
            }
            return map;
    }
    }

Y este es el código principal:

ConnectionConfiguration config = new ConnectionConfiguration("chat.facebook.com",     5222);
config.setSASLAuthenticationEnabled(true);
//        config.setDebuggerEnabled(true);
XMPPConnection connection = new XMPPConnection(config);


try {
    //ESTA LINEA HACE QUE NO DE TIMEOUT
    SmackConfiguration.setPacketReplyTimeout(15000);
    XMPPConnection.DEBUG_ENABLED = true;
    SASLAuthentication.registerSASLMechanism("X-FACEBOOK-PLATFORM", SASLXFacebookPlatformMechanism.class);
    SASLAuthentication.supportSASLMechanism("X-FACEBOOK-PLATFORM", 0);
    connection.connect();
    String apiKey = "3290282390339";
    String accessToken = "ADSJGFGFKDKSJKSJD0-43DKJSDJKSDKJSD094JJSDKJSDKJDSNDSKJEWEWNSDLkljdkjs";
    connection.login(apiKey, accessToken);
...

Gracias de antemano por cualquier consejo.

Respuestas a la pregunta(1)

Su respuesta a la pregunta