facebook status

2 views
Skip to first unread message

Mark Hammond

unread,
Aug 24, 2010, 4:15:35 AM8/24/10
to raindr...@googlegroups.com
I got a little further than I expected with facebook - I've got account
setup working (which I pushed), and made a reasonable start on message
synching (which I haven't).

* Make sure you restart storm after pulling so the changes in
development.ini are picked up.

* Development.ini has the key and secret for a facebook app I own called
'raindrop' - my facebook email is my skippinet address - if you make a
friend request to me I'll add you as developers. (I've currently no
raindrop friends, by choice, but it looks like that might have to
change! Or just create your own app and update the ID and secret). The
app is configured to use 127.0.0.1:5000 (the current raindrop defaults),
so make sure this is how you are hitting the api.

* The account setup page now offers to setup a facebook account after
the twitter account. Visit http://127.0.0.1:5000/accounts/#facebook to
setup just this account and skip the rest of the setup.

* Just for fun, the final response from the auth dance returns the
raindrop account ID and the facebook 'name' of the user in the request
params - you will see this in the URL in the 'success' step. This isn't
reflected in the UI itself though. The UI is still showing the twitter
logo for the facebook step (which needs to be fixed by updating
accounts/i/x.png and a change made to the offset in the style IIUC)

* Instead of doing something useful with the facebook profile, I simply
print it to the storm console - as discussed we probably want to create
a "me" contact/contact-point but I'm not exactly sure how to best do
this - does poco have something I can use? I also think we need to
change the raindrop account DB schema so that real contact-point records
are associated with the account - currently we ask the raindrop
'protocol' implementation to synthesize one from the fields in the
account at runtime, but instead we should create real contact-point
records at the time we create the account.

* Facebook oauth is radically different to twitter and gmail - nothing
need be signed (presumably as the auth is done via https) and the params
are quite different. For this and a couple of other reasons, there is a
new single API end-point called /accounts/oauth_facebook - this single
end-point is used for both legs of the auth dance - see the comments in
this function for more details. I'm still open to the idea of using an
external oauth lib, but it doesn't seem urgent at this stage.

Once all this is done you will have a facebook account in raindrop -
sync-messages will not be able to use it yet etc, but it is there :)

Mark

James Burke

unread,
Aug 24, 2010, 4:54:03 PM8/24/10
to raindr...@googlegroups.com
On Tue, Aug 24, 2010 at 1:15 AM, Mark Hammond <mham...@skippinet.com.au> wrote:
> * Just for fun, the final response from the auth dance returns the raindrop
> account ID and the facebook 'name' of the user in the request params - you
> will see this in the URL in the 'success' step.  This isn't reflected in the
> UI itself though.  The UI is still showing the twitter logo for the facebook
> step (which needs to be fixed by updating accounts/i/x.png and a change made
> to the offset in the style IIUC)

I update the icon to be a facebook one. It was able to see the
facebook stuff in the log and in the success URL. We do not need it in
the URL long term, but very cool, it works!

James

Reply all
Reply to author
Forward
0 new messages