Differences between revisions 25 and 47 (spanning 22 versions)
Revision 25 as of 2011-09-24 09:45:13
Size: 5783
Editor: cpc8-cmbg14-2-0-cust844
Comment:
Revision 47 as of 2015-12-04 15:44:45
Size: 6809
Editor: dx
Comment: mark this as broken
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Setting up a Facebook account in !BitlBee = ## page was renamed from HowtoFacebook
= Setting up a Facebook account in BitlBee (broken method) =
Line 3: Line 4:
Facebook's offering a XMPP server for some time already, which means you can use their chat using any XMPP/Jabber client, including !BitlBee. {{{#!wiki warning
'''As of 2015-12-04 this looks completely broken.'''
Line 5: Line 7:
To be able to use it, you do need to have a [[http://www.facebook.com/username/|Facebook username]]. Username/password auth doesn't work, oauth has been broken for months.
Line 7: Line 9:
'''Important''': You will have to all lowercase letters for your facebook username. See [[HowtoFacebookMQTT]] instead.

The rest of this page contains outdated information.
}}}

Facebook offers (or offered?) an XMPP gateway to their service. It is currently in the process of being discontinued, --(but might still work with the username/password method described below in this page.)--

Instructions to use [[HowtoFacebookMQTT|the newer bitlbee-facebook plugin]] are available [[HowtoFacebookMQTT|here]]

<<TableOfContents(2)>>

== Connecting ==

First, you do need to have a [[http://www.facebook.com/username/|Facebook username]].

'''Important''': You will have to use all lowercase letters for your Facebook username in Bitlbee, but not on Facebook itself. E.g. your username on Facebook can be "Someone", but in Bitlbee, you'll have to use "someone".
Line 10: Line 27:
23:44:32 <wilmer> account add jabber yourusername@chat.facebook.com ''yourpassword'' 23:44:32 <wilmer> account add jabber yourusername@chat.facebook.com "yourpassword"
Line 12: Line 29:
23:44:42 <wilmer> account facebook set nick_source full_name
23:44:42 <root> nick_source = `full_name'
23:44:42 <wilmer> account facebook set nick_format %full_name
23:44:42 <root> nick_format = `%full_name'
Line 23: Line 40:
If you're getting authentication failures, [[http://wiki.developers.facebook.com/index.php/Integrating_with_Facebook_Chat#Authenticating_with_Jabber|try logging out and back into the Facebook website]]. If you're getting authentication failures, [[http://developers.facebook.com/docs/chat/#jabber|try logging out and back into the Facebook website]]. If the problem persists, try connecting using OAuth for at least one time (see topic above), as this seems to fix the problem in some cases.

This will probably appear as an "application" called "Rtgw_xmpp_username_password_login" in your facebook account settings, which probably means "Realtime gateway xmpp username/password login"
Line 27: Line 46:
All contacts have numeric handles, which makes for very ugly usernames by default, since nicknames are generated from the IM handle. By setting the ''nick_source'' account setting to ''full_name'', like this: All contacts have numeric handles, which makes for very ugly usernames by default, since nicknames are generated from the IM handle. By setting the ''nick_format'' account setting to ''%full_name'', like this:
Line 30: Line 49:
account fb set nick_source full_name (BitlBee 3.0+)
account set facebook/nick_source full_name (Older versions)
account fb set nick_format %full_name
Line 34: Line 52:
(Replacing X with the number of your Facebook account), the nicknames will be generated based on the full names. Enter: You need to reconnect to see the changes:
Line 37: Line 55:
help set nick_source account fb off
account fb on
Line 40: Line 59:
For more detailed information on what this setting does and what its parameters are. Enter: {{{help nick_format}}} or {{{help set nick_format}}} for more detailed information on what this setting does and what its parameters are.
Line 48: Line 67:
'''Note:''' The ''nick_source'' setting was added in !BitlBee 1.2.5. Alternatively, there are scripts that automatically rename numeric handles for some IRC clients.
Line 50: Line 69:
Alternatively, there exists scripts that automatically renames numeric handles for some IRC clients.

=== Irssi ===

Irssi users can use [[http://github.com/avar/irssi-bitlbee-facebook-rename|this script]] to rename the contacts. Note that this script can translate some non-ASCII characters to something more IRC-friendly, whereas the !BitlBee setting will just strip everything non-ASCII.

=== Weechat ===

Weechat users can use the [[http://www.weechat.org/scripts/source/stable/facebook_rename.py/|facebook-rename]] script to automatically rename any user who joins with a numerical name. Note that your Bitlbee server handle must be named 'bitlbee', or you'll have to change the "bitlbeeServer" parameter value on the top of the script to your handle name.

This script, like the !BitlBee setting, will simply strip everything non-ASCII.
 * Irssi users can use [[http://github.com/avar/irssi-bitlbee-facebook-rename|this script]] to rename the contacts. Note that this script can translate some non-ASCII characters to something more IRC-friendly, whereas the !BitlBee setting will just strip everything non-ASCII.
 * Weechat users can use the [[http://www.weechat.org/scripts/source/stable/facebook_rename.py/|facebook-rename]] script to automatically rename any user who joins with a numerical name. Note that your Bitlbee server handle must be named 'bitlbee', or you'll have to change the "bitlbeeServer" parameter value on the top of the script to your handle name. <<BR>> This script, like the !BitlBee setting, will simply strip everything non-ASCII.
Line 70: Line 80:
== "Warning: Received incomplete IQ-set packet" ==

In versions 1.2.7 and older you may be getting this message when using !BitlBee + Facebook Chat via XMPP. It's completely harmless, but very annoying. You can upgrade to a newer version to make it go away, or use /ignore to at least not see it anymore. In Irssi, something like this should work:

{{{
/ignore -pattern "Received incomplete IQ-set packet" root *
}}}
'''Note2:''' If this does still happen to you, try using OAuth as described above.
Line 81: Line 85:

== Lost messages ==

You may have trouble either sending or receiving messages, which otherwise show up in the web interface. We assume this also is Facebook's fault (see above) though if you can prove otherwise, feel free to reopen [[http://bugs.bitlbee.org/bitlbee/ticket/927|this bug report]] to submit a patch.

== Missing Contacts ==

This is also a Facebook issue, and you'll see the same problem using other XMPP clients. In particular, mobile contacts that are "online - mobile" will (usually) show up, but mobile contacts that are "idle" won't, even though you can send them messages from the web interface.

Setting up a Facebook account in BitlBee (broken method)

As of 2015-12-04 this looks completely broken.

Username/password auth doesn't work, oauth has been broken for months.

See HowtoFacebookMQTT instead.

The rest of this page contains outdated information.

Facebook offers (or offered?) an XMPP gateway to their service. It is currently in the process of being discontinued, but might still work with the username/password method described below in this page.

Instructions to use the newer bitlbee-facebook plugin are available here

Connecting

First, you do need to have a Facebook username.

Important: You will have to use all lowercase letters for your Facebook username in Bitlbee, but not on Facebook itself. E.g. your username on Facebook can be "Someone", but in Bitlbee, you'll have to use "someone".

   1 23:44:32 <wilmer> account add jabber yourusername@chat.facebook.com "yourpassword"
   2 23:44:32 <root> Account successfully added
   3 23:44:42 <wilmer> account facebook set nick_format %full_name
   4 23:44:42 <root> nick_format = `%full_name'
   5 23:44:43 <wilmer> account on
   6 23:44:44 <root> jabber(wvdgaast@chat.facebook.com) - Logging in: Connecting
   7 23:44:44 <root> jabber(wvdgaast@chat.facebook.com) - Logging in: Connected to server, logging in
   8 23:44:45 <root> jabber(wvdgaast@chat.facebook.com) - Logging in: Authentication finished
   9 23:44:45 <root> jabber(wvdgaast@chat.facebook.com) - Logging in: Server changed session resource string to `BitlBee_5d9293ae_4870E52387B28'
  10 23:44:46 <root> jabber(wvdgaast@chat.facebook.com) - Logging in: Authenticated, requesting buddy list
  11 23:44:47 <root> jabber(wvdgaast@chat.facebook.com) - Logging in: Logged in

If you're getting authentication failures, try logging out and back into the Facebook website. If the problem persists, try connecting using OAuth for at least one time (see topic above), as this seems to fix the problem in some cases.

This will probably appear as an "application" called "Rtgw_xmpp_username_password_login" in your facebook account settings, which probably means "Realtime gateway xmpp username/password login"

Numeric usernames

All contacts have numeric handles, which makes for very ugly usernames by default, since nicknames are generated from the IM handle. By setting the nick_format account setting to %full_name, like this:

account fb set nick_format %full_name

You need to reconnect to see the changes:

account fb off
account fb on

Enter: help nick_format or help set nick_format for more detailed information on what this setting does and what its parameters are.

By default nicks will be entirely lowercased. It can be easier to distinguish names if you use the capitalisation Facebook applies to names. This is not true CamelCase, but close. To turn lowercasing of nicks off enter:

set lcnicks off

Alternatively, there are scripts that automatically rename numeric handles for some IRC clients.

  • Irssi users can use this script to rename the contacts. Note that this script can translate some non-ASCII characters to something more IRC-friendly, whereas the BitlBee setting will just strip everything non-ASCII.

  • Weechat users can use the facebook-rename script to automatically rename any user who joins with a numerical name. Note that your Bitlbee server handle must be named 'bitlbee', or you'll have to change the "bitlbeeServer" parameter value on the top of the script to your handle name.
    This script, like the BitlBee setting, will simply strip everything non-ASCII.

I get nothing after "Logging in: Authenticated, requesting buddy list"

This is a problem with Facebook, not with BitlBee. It's especially likely that you get this error on public servers. The problem's caused by security measures on Facebook's side. They keep track of the IP addresses from where you've used their website in the past, and often restrict access to your account via their XMPP server to just those IP addresses. Most new users had used facebook chat previously only from their home/office etc and facebook probably keeps a log of all IPs that were used to access that account. And, when you access your account from a public server (which is located in a different country/continent for most of users), facebook refuses to let you in. (Gmail/gtalk do similar tracking except that instead of refusing user to login, they flag a warning and prompt user to change password in case the access sounds malicious). If you get this error, you can try to log into Facebook (via an SSH tunnel, for example) from the IP address that also hosts the BitlBee instance.

But if you use a public BitlBee server, unfortunately there's not much you can do. BitlBee can't offer any help with this since that could be seen as a violation of their terms of service. Fortunately not all accounts are affected by this, several people have reported that they can log into Facebook XMPP from wherever they want. Possibly accounts get unlocked once they're used from many places (i.e. different IPs) already. You can try logging in to facebook web chat from different IPs (maybe office, home, university) a few times before it lets you login from a public bilbee server.

Note: It seems that this should no longer happen, and most likely Facebook XMPP will now allow connections from any IP address, after verifying the connection attempt on their website.

Note2: If this does still happen to you, try using OAuth as described above.

I can't set myself as away.

Yes. That has nothing to do with BitlBee though, it's a well-known limitation of the very poor XMPP service offered by Facebook.

Lost messages

You may have trouble either sending or receiving messages, which otherwise show up in the web interface. We assume this also is Facebook's fault (see above) though if you can prove otherwise, feel free to reopen this bug report to submit a patch.

Missing Contacts

This is also a Facebook issue, and you'll see the same problem using other XMPP clients. In particular, mobile contacts that are "online - mobile" will (usually) show up, but mobile contacts that are "idle" won't, even though you can send them messages from the web interface.

BitlBee Wiki: HowtoFacebookXMPP (last edited 2015-12-04 15:44:45 by dx)