2

I digged much into internet, but being newbie, couldn't do much. I have summed up the following : Facebook Chat can be used via two Authentication (via Facebook Chat API official documentation) :

1> X-FACEBOOK-PLATFORM 2> DIGEST-MD5

1> X-FACEBOOK-PLATFORM Method has very less documentation, none being official, closest using pyfacebook & pyxmpp (The official facebook chat api page has a reference at the end). Implementing the both to GAE is another headache, apart from the debug problems suffered hence. The creation of apps and using its ID as stated in some resources is not a problem though. I found a nice GAE walkthrough of pyfacebook on riccomini.name/Topics/Web/GoogleAppEngine/FacebookConnect/

2> DIGEST-MD5 is the common method of username - password which can be carries out by any xmpp client. So i though i could use a XMPP python client library like xmpppy which suited me best (as i don't need advanced functions)

Coming staraight to my question : is my inference correct? I am thinking to proceed via Method 2 (Im well aware of the security risks involved in MD5 crypting of password, please don't remind me of that). I could find no refence of using xmpppy with GAE, so am I proceeding correct?

Could anyone provide me a reference of xmpppy used along with GAE ??

(I'm sorry if i was unclear. Cant help, i am no silicon valley engineer but a simple student of age 15yrs)

atx
  • 41
  • 6

3 Answers3

6

You can't connect to external XMPP servers using App Engine, so if Facebook requires it for chat integration, this isn't possible.

Nick Johnson
  • 100,655
  • 16
  • 128
  • 198
  • Why wont it be possible, if i use some python xmpp client api ?? i dont think it uses some extra priveleges..... I am sure that it wass possible to log onto a gmail (jabber) id and check presence via GAE..... – atx Mar 09 '11 at 05:14
  • 1
    @ATX Because App Engine apps cannot make outgoing socket connections - only HTTP requests. – Nick Johnson Mar 09 '11 at 19:24
  • I got to know that lately, but my aim is not to build a xmpp Server, i just have to connect to other xmpp server to get the presence. And I think connecting to the port of an xmpp server is permissible. – atx Mar 10 '11 at 15:03
  • 1
    @ATX As I just said, App Engine apps cannot make outgoing TCP socket connections. That means it's not possible to connect to an external XMPP server. – Nick Johnson Mar 10 '11 at 17:26
0

GAE has a built in XMPP service. Perhaps you can use that instead of xmpppy.

http://code.google.com/appengine/docs/python/xmpp/overview.html

cope360
  • 6,195
  • 2
  • 20
  • 33
  • Sorry, but that xmpp is for the GAE bot itself, i cant use that xmpp to log into facebook, but only to communicate with other xmpp services. (As far as I have collected it). – atx Mar 07 '11 at 07:49
0

You should have a look into XEP-206 (XMPP Over BOSH) for connecting to XMPP through HTTP-protocol. http://xmpp.org/extensions/xep-0206.html

I don't know if FaceBook supports BOSH though.

You need c2s-protocol to talk to FaceBook, as the s2s-protocol (federation) is not implemented by FaceBook.

Anders
  • 520
  • 4
  • 11