Note that there are some explanatory texts on larger screens.

plurals
  1. POXMPPError connecting to chat.facebook.com (Permission denied) logging in to facebook chat with asmack
    primarykey
    data
    text
    <p>As you may know, there's not a single organized documentation on how to properly login to Facebook using the asmack library. I've somehow managed to find some codes in the net to at least allow me to login to my account but why do I keep getting the following exception:</p> <blockquote> <p>XMPPError connecting to chat.facebook.com:5222.: remote-server-error(502) XMPPError connecting to chat.facebook.com:5222. -- caused by: java.net.SocketException: Permission denied</p> </blockquote> <p>Here's the code:</p> <pre><code>((Button) findViewById(R.id.login_btn)).setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { ConnectionConfiguration config = new ConnectionConfiguration("chat.facebook.com", 5222, "chat.facebook.com"); config.setSASLAuthenticationEnabled(true); Connection conn = new XMPPConnection(config); try { conn.connect(); SASLAuthentication.supportSASLMechanism("PLAIN", 0); ProgressDialog loading = ProgressDialog.show(instance, "", "Loading..."); conn.login(login_field.getText().toString(), pwd_field.getText().toString(), login_field.getText().toString() + "/fbchat"); loading.hide(); new AlertDialog.Builder(instance).setMessage(conn.getUser()) .create().show(); } catch (XMPPException e) { new AlertDialog.Builder(instance).setMessage(e.toString()) .setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }) .create().show(); } } }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload