You are here

function fb_opengraph_fb in Drupal for Facebook 7.4

Implements hook_fb().

Act on ajax event 'fb_opengraph_publish_action' allowing third parties to use ajax to publish an event. Note FB.api() can also be used to publish events directly to facebook.

File

./fb_opengraph.module, line 74
Open Graph Helpers

Code

function fb_opengraph_fb($op, $data, &$return) {
  if ($op == FB_OP_AJAX && $data['event_type'] == 'fb_opengraph_publish_action') {

    // As a convenience to third party modules, handle 'fb_opengraph_publish_action'.
    extract($data);
    fb_opengraph_publish_action($event_data['action'], array(
      $event_data['object_type'] => $event_data['object_url'],
    ));
  }
}