Differences between revisions 10 and 11
Revision 10 as of 2016-03-27 00:14:33
Size: 4988
Editor: dx
Comment:
Revision 11 as of 2016-07-20 02:19:15
Size: 5158
Editor: dx
Comment: Mention mark_read_reply
Deletions are marked like this. Additions are marked like this.
Line 102: Line 102:
==== mark_read_reply ====

{{{
account facebook set mark_read_reply (true/false)
}}}

If set to true, messages will be marked as read as soon you reply to them.

How to set up Facebook with bitlbee-facebook

As an alternative to the now (mostly-)defunct XMPP service provided by facebook, jgeboski (who also wrote bitlbee-steam) made a new plugin based on the facebook messenger mobile client (which uses a protocol called MQTT)

It also happens to work much better than the XMPP service ever did, and supports groupchats.

Building and Installing

APT repo

An APT repo for several recent debian/ubuntu versions is maintained by jgeboski himself here:

https://jgeboski.github.io/#debian-and-ubuntu

Note that this must be used together with the other APT repo, http://code.bitlbee.org/debian/

Not installing anything

The public server at im.codemonkey.be has bitlbee-facebook installed.

(That server is administered by Tom Laermans aka sid3windr, who also admins testing.bitlbee.org, see the public server list)

The manual way

Make sure bitlbee and its headers have been installed. If bitlbee came from the distribution's repository, it will most likely need the development package, usually bitlbee-dev or bitlbee-devel.

If bitlbee was built by hand (or alike via a script), ensure the make target install-dev is invoked. This target is not called by default, and will install the headers that are needed.

$ git clone https://github.com/jgeboski/bitlbee-facebook.git
$ cd bitlbee-facebook

With a "global" (or system) bitlbee installation:

$ ./autogen.sh
$ make
$ make install

Or with a "local" bitlbee installation (location: $HOME/bitlbee):

$ export BITLBEE_CFLAGS="-I$HOME/bitlbee/include/bitlbee"
$ export BITLBEE_LIBS=""
$ ./autogen.sh --with-plugindir=$HOME/bitlbee/lib
$ make
$ make install

Usage

Before continuing, please note, it is recommended that you use an app password for your Facebook account. Not only is this more secure than leaving your password within bitlbee, but it allows the usage of two factor authentication methods. An app password can be generated via the security page on the Facebook website.

Getting started

Use the same email you use to log in to facebook, and either your main password or an app password.

> account add facebook <email> <password>
> account facebook on

Joining existing groupchats

> fbchats facebook
> fbjoin facebook <index> <channel>
> /topic <message>
> /invite <user>

Note that fbjoin is only needed the first time you join a channel. After that, you can just do /join <channel>.

You can configure these channels to be autojoined by doing channel <channel> set auto_join true

Creating new groupchats

To create a new groupchat, use the fbcreate command, followed by a space separated list of users (at least two), and then "fbjoin" the groupchat to give it a name.

> fbcreate [acc] <user user ...>
> fbjoin [acc] 1 <channel>
> /topic <message>
> /invite <user>

Settings

mark_read

account facebook set mark_read (true/false)

If set to true, all messages will be marked as read as soon as they are received.

This can be useful to avoid getting message notifications in the website (if bitlbee is your main way to read facebook messages) but your contacts might complain that you've read their messages and didn't reply.

mark_read_reply

account facebook set mark_read_reply (true/false)

If set to true, messages will be marked as read as soon you reply to them.

show_unread

account facebook set show_unread (true/false)

If set to true, unread messages will be shown when connecting.

Enabling this without mark_read may result in getting the same messages repeatedly if the account reconnects frequently.

Otherwise, if mark_read is on, it can be a way to retrieve offline messages.

group_chat_open

account facebook set group_chat_open (true/false/all)

This setting controls when to join a channel if a message is sent to the corresponding groupchat. It has three possible values:

  • false (default), which means not automatically joining channels ever.

  • true, which will automatically join channels that are in the local channel list (you joined them before)

  • all, which will automatically join channels always, creating them if they don't exist.

Issues

Any issues with this plugin should be reported to https://github.com/jgeboski/bitlbee-facebook/issues

Debugging

To enable debugging output:

$ export BITLBEE_DEBUG=1      # or use BITLBEE_DEBUG_FACEBOOK=1 to debug only this plugin
$ bitlbee -Dnv

Ensure that you're running bitlbee as the correct user (with the right permissions to the user configuration directory, usually /var/lib/bitlbee)

BitlBee Wiki: HowtoFacebookMQTT (last edited 2022-01-09 18:08:25 by h-2001-9b1-25ff-d800-7afa-61a3-d0c0-4d5b)