function fb_get_app_data in Drupal for Facebook 7.3
Same name and namespace in other branches
- 6.3 fb.module \fb_get_app_data()
- 6.2 fb.module \fb_get_app_data()
Convenience method for other modules to attach data to the fb_app object.
It is assumed the fb_app implementation will fill in the data field. We really should clean up the separation between modules, or merge fb_app.module into this one.
11 calls to fb_get_app_data()
- fb_admin_app_page in ./
fb.admin.inc - fb_app_edit_form in ./
fb_app.admin.inc - Builds the form used to edit an application.
- fb_app_set_app_properties in ./
fb_app.admin.inc - Sets callback URLs and other properties of a facebook app. Calls the facebook
- fb_devel_fb in ./
fb_devel.module - Implements hook_fb().
- fb_permission_fb_required_perms_alter in contrib/
fb_permission.module - Implements hook_fb_required_perms_alter().
File
- ./
fb.module, line 1191 - This is the core required module of Drupal for Facebook.
Code
function fb_get_app_data(&$fb_app) {
if (!$fb_app) {
// Avoid PHP strict error.
return array();
}
if (!isset($fb_app->fb_app_data)) {
$fb_app->fb_app_data = !empty($fb_app->data) ? unserialize($fb_app->data) : array();
}
return $fb_app->fb_app_data;
}