Facebook in Pidgin

Eion Robb eionrobb at gmail.com
Thu Nov 20 22:25:41 EST 2008


> Message: 1
> Date: Thu, 20 Nov 2008 17:54:08 -0800
> From: "Mark Doliner" <mark at kingant.net>
> Subject: Facebook in Pidgin
> To: "Pidgin Devel Mailing List" <devel at pidgin.im>
> Message-ID:
>        <55130ac0811201754ycb7b9d9rdfa6ec4af2999bce at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Background:
> * Facebook added IM to their site in April.  It uses their own
> proprietary protocol which uses HTTP requests and comet/HTTP
> long-polling with JSON formatted data.
> * They have announced that they're working on letting people log in
> using XMPP, but they have not announced a timeframe
This was an issue I raised months ago, but was prompty shot down in
irc, because it was apparently worth waiting for XMPP rather than
implementing another proprietry protocol, which was odd, since I
thought Pidgin was all about implementing lots of proprietry
protocols.

> * I and a few other Pidgin gives have access to a beta version of
> their XMPP server, for testing purposes.  It works, but that doesn't
> mean it's ready to be released to the public
Wow!  That's really good news.

> * Eion Robb wrote a Facebook plugin for Pidgin:
> http://code.google.com/p/pidgin-facebookchat/  Word on the street is
> that it's crashy.
He sure did, and he tries to fix up what he can when he can :)

> My question is: How do people feel about adding a Facebook PRPL to
> Pidgin that implements their HTTP protocol?  I think it's a good idea
> because Facebook is pretty popular, and I think this would keep Pidgin
> current and give us a little edge.  Maybe attract more developer
> interest, etc.  The only reason I see for not doing it is that there
> would be less incentive for Facebook to finish their XMPP interface.
> But honestly I don't think we have a lot of leverage there.
If this gets accepted into Pidgin, can I get some commit access then
so that I can modify still, or should I just keep making changes to my
plugin and you can port them over?
And yes, the Facebook plugin is very popular if you have a look at the
download counts.

> I've taken Eion's plugin and modified with reckless abandon, renaming
> variables and functions, moving stuff around, changing the order of
> stuff, changing // comments to /* */, removing as many forward
> function declarations as possible, depending on features added in
> recent versions of Pidgin, etc.  I also made it more stable by keeping
> track of the return values from purple_proxy_connect() and
> purple_input_add() and purple_timeout_add() and freeing/closing them
> appropriately.  And I think I disabled some features (search for
> 'MARK' to see what I mean.)  Eion: Please don't hate me.  My version
> is attached.
No hate here, the plugin needed some TLC.  It was pretty close to
being stable and I was just working on doing the same thing of closing
the purple_proxy_connect() et al. on disconnect.

I've looked over all your changes, and they look good.  You've cleaned
up a lot of issues I've had without mutilating the code too much ;)

In the code you've picked a random channel number, instead of loading
the saved channel number (line 1291 approx).  The channel number needs
to be the right one, otherwise the server asks to refresh the
connection and won't deliver messages.  I've found that if there's no
channel number, then it must be because the chat server is offline.

I'm more than happy to talk about code-specific stuff and answer the
questions you've put in the code off-list if you like?

I would love to get the plugin included into Pidgin proper.  The more
people using it, the better. :)

Cheers,
Eion




More information about the Devel mailing list