Changes to hook_fb

Dave Cohen's picture

My most recent check-in changes the hook_fb API. I have a feeling not many users are implementing their own hook_fb, so I don't expect this to inconvenience anyone.

If you are, the new parameters are:

hook_fb($op, $data, &$return)

$op will tell your hook what is expected of it. See fb.module for the list of ops.

$data is an array containins a variety of things, depending on the $op. Most importantly, $data['fb_app'] and $data[$fb] will be set when these are known.

$return is a data structure which your app can set, for those ops which expect a returned value.

The important thing to note is that $fb_app is not longer passed in, find it in $data. And the order of $data and $return parameters has changed.

which version?

In which release is this change made?

Dave Cohen's picture

2.x and 3.x

That's the way the hook works in both 2.x and 3.x branches of modules/fb.