3

I made a few Facebook FBML Canvas pages (Facebook considers these to be Applications) for a company, and they requested that users who "Like" the page would be redirected to another page, or the page will display different content with AJAX.

I went through the Facebook Developers Documentation, but I can't find a clue on how to do it.

I'm sure someone has done it before, any suggestions?

ChrisF
  • 134,786
  • 31
  • 255
  • 325
Dean
  • 7,814
  • 8
  • 30
  • 31
  • possible duplicate of [How to check if a user likes my Facebook Page or URL using Facebook's API](http://stackoverflow.com/questions/5093398/how-to-check-if-a-user-likes-my-facebook-page-or-url-using-facebooks-api) – Igy Feb 12 '13 at 20:07

3 Answers3

1

I found this on the Facebook forum I think it might help you out!

How can i redirect when someone like/share?

I haven't tried it myself though!

Good luck!

Trufa
  • 39,971
  • 43
  • 126
  • 190
  • @harsh this is the best I can do http://web.archive.org/web/20110819203920/http://forum.developers.facebook.net/viewtopic.php?pid=252358 – Trufa Mar 25 '13 at 12:01
1

You can use either the JS or PHP sdk to check if a user liked a page. See examples below...

Uses JS sdk to check if a user liked a page (can be any page, just set the page id). This can be used in a standalone app or from within a page tab. - http://unbound-media.com/facebook/how-to-tell-if-a-facebook-user-likes-your-facebook-application/

Uses PHP sdk to check if a user liked the page from a tabbed app (can only check if user liked the current page they're on). This method can also be converted to JS. - How to check if a user likes my Facebook Page or URL using Facebook's API

Community
  • 1
  • 1
John Himmelman
  • 21,504
  • 22
  • 65
  • 80
1

If you are dealing with facebook app tab page, the following code helps you to find isfan status

$signed = parse_signed_request($_REQUEST['signed_request'], 'YOUR-APP-SECRET');
if ($signed['page']['liked'] == 1) {
    $fan = true;
} else {
    $fan = false;
}

Visit this link for demo and source code.

Be Brave Be Like Ukraine
  • 7,596
  • 3
  • 42
  • 66
Drupal Sinha
  • 27
  • 1
  • 3