Differences between revisions 4 and 5
Revision 4 as of 2015-08-28 21:51:21
Size: 3571
Editor: pool-96-240-138-46
Comment:
Revision 5 as of 2015-08-28 22:00:00
Size: 3797
Editor: host183
Comment: add note about /join and auto_join
Deletions are marked like this. Additions are marked like this.
Line 77: Line 77:
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}}}

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

See the README for instructions on how to add it to your sources.list

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

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

Issues

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

Debugging

To enable debugging support, you need to add --enable-debug to the ./autogen.sh line in the build instructions above:

$ ./autogen.sh --enable-debug
$ make
$ make install

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)