views:

557

answers:

2

I'm trying to use the drupal module called FB (http://drupal.org/project/fb). I just want to know if I'm on the right track. I've installed the module, setup the keys and so forth. All I want is the following:

  • To make a call into facebook
  • Retrieve all MY notes
  • Retrieve all the COMMENTS on my notes

So my questions are:

  • Is it necessary to write an app if I just want to make simple call like this?
  • Is there an easier way than the module i'm using?
+1  A: 

You may find that the Activity Stream facebook extention does what you need.

Jeremy French
+1  A: 

Making some assumptions here: 1) you're familiar with programming drupal modules, 2) not so much with the facebook api, 3) you want to export your notes to display on a personal site.

The short answer is Yes, you need to create an application. You need the facebook client API files, and an API key/secret, which you only get by creating an app. Sounds like you've already gotten this far anyway.

However, from first glance, it looks like you only need to enable the DFF facebook API module, and then you can write your own module, using the global $fb to access facebook. The client API methods are mostly self-explanatory, if a little tweaky.

Possible problem: if your facebook details are restricted to friends only, visitors to your personal site won't have access to your notes via facebook API calls. The API only exposes what's publically accessible, or it exposes the (user-specific) details & friends when a visitor logs in (prompted by calling the require_login method). So, I imagine you'd need to store the notes locally, updating them by logging in yourself.

You could feasibly bypass the DFF modules altogether & just include the FB client API from your own module, but DFF looks like it handles all the weird & badly-documented fb behaviour - particularly that related to require_login - that'd otherwise have you smacking your head against a wall for three days. Good luck.

Caveat: I've never used the DFF modules. I used FBConnect, which was sufficient, but I spent a lot of time smacking my head against a wall.

Heather Gaye
Thing is, I want to import my notes on facebook into my drupal sites db. I managed to get this done using a "infinite key". :-) But all you guys advice did help a bit. Thanks!
RD
Oooh, thanks for mentioning the infinite session keys, was the first I've heard of the concept; I'd just assumed that all fb session keys would expire after a certain time. Reckon I'll find this extremely useful in future!
Heather Gaye

related questions