Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
facebook chat(xmpp). X-FACEBOOK-PLATFORM SASL for ruby xmpp4r
Ruby
branch: master

Merge pull request #3 from phwd/master

Update README Example to variable
latest commit 57f7a86e97
@kissrobber authored
Failed to load latest commit information.
lib gem
.project first commit
README Fixed `to` variable, added notice about xmpp_login
xmpp4r_facebook.gemspec gem

README

Expansion XMPP4R to authenticate with Facebook Connect in Ruby

======================================
Install:
======================================
gem install xmpp4r_facebook

======================================
Sample code:
======================================
require 'xmpp4r_facebook'

id = '-<sender user id>@chat.facebook.com'
to = '-<user id>@chat.facebook.com'
body = "hello, Im not spam!"
subject = 'message from ruby'
message = Jabber::Message.new to, body
message.subject = subject

client = Jabber::Client.new Jabber::JID.new(id)
client.connect
client.auth_sasl(Jabber::SASL::XFacebookPlatform.new(client, '<App ID/API Key>', '<Access Token>', '<App Secret>'), nil)
client.send message
client.close

Ensure your access token has `xmpp_login` permission. Check at https://developers.facebook.com/tools/debug

(I want to work in Silicon Valley as a software engineer.)
Copyright (c) 2010 kissrobber, released under the GPL license
Something went wrong with that request. Please try again.