Facebook Check if the user "liked" on the page

I made several Facebook FBMLCanvas pages (Facebook considers them applications) for the company, and they asked users who like the page to be redirected to another page, or other content with AJAX to be displayed on the page.

I looked at the developer documentation for the Facebook developers, but I can’t find any tips on how to do this.

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

+3
source share
3 answers

I found this on the Facebook forum, I think it can help you!

How can I redirect when someone likes / shares?

I have not tried it myself!

Good luck

+1
source

If you are dealing with the facebook application bookmark, the following code will help you find the isfanstatus

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

Visit this link for a demo and source code.

+1
source

Source: https://habr.com/ru/post/1786722/


All Articles