function _fb_get_name in Drupal for Facebook 7.3
Same name and namespace in other branches
- 6.3 fb.module \_fb_get_name()
Helper function determines a name from data returned from fb_graph(). Almost always, graph data includes a 'name'. But in rare cases that is not present and we use an id instead.
5 calls to _fb_get_name()
- fb_stream_admin_settings in ./
fb_stream.admin.inc - Form callback for general settings.
- fb_stream_form_alter in ./
fb_stream.module - Implements hook_form_alter().
- fb_stream_node_settings_form in ./
fb_stream.module - Helper function for hook_form_alter() renders the settings per node-type.
- fb_stream_post_options in ./
fb_stream.module - Helper function to add post options to a form.
- fb_stream_requirements in ./
fb_stream.install - Implementation of hook_requirements().
File
- ./
fb.module, line 830 - This is the core required module of Drupal for Facebook.
Code
function _fb_get_name($graph_data) {
if (!empty($graph_data['name'])) {
return $graph_data['name'];
}
elseif (!empty($graph_data['id'])) {
return $graph_data['id'];
}
else {
return t('Unknown');
}
}