/ Published in: PHP
Expand |
Embed | Plain Text
<?php $session = $facebook->getSession(); $user = $facebook->getUser(); $page = 'PAGEID'; // Session based API call. if ($session) { try { 'SELECT target_id FROM connection WHERE source_id =' . $user . 'AND target_id =' .$page )); // user has NOT Liked the page echo "Like my page!"; } else { // user HAS Liked the page echo "Thank you for liking my page"; } } catch (FacebookApiException $e) { } } ?>
You need to login to post a comment.
