You are here

function fb_is_page_liked in Drupal for Facebook 7.3

Same name and namespace in other branches
  1. 6.3 fb.module \fb_is_page_liked()

Does the current user like the current page?

Expect this to work only when fb_is_tab() returns TRUE.

1 string reference to 'fb_is_page_liked'
fb_rules_rules_condition_info in contrib/fb_rules.rules.inc
Implementation of hook_rules_condition_info().

File

./fb.module, line 931
This is the core required module of Drupal for Facebook.

Code

function fb_is_page_liked() {
  global $_fb;
  if (!empty($_fb)) {
    $sr = $_fb
      ->getSignedRequest();
    return isset($sr['page']) && $sr['page']['liked'];
  }
}