This question already has an answer here:
How do I check if a user who is logged in to my website via the facebook php sdk has liked my page so that I can show him some secret content...
</div>
This question already has an answer here:
How do I check if a user who is logged in to my website via the facebook php sdk has liked my page so that I can show him some secret content...
</div>
If you have the appropriate permissions you can access the Likes property of the user: you can then check the returned list to see if your URL is in the list. You can use something like this:
$likes = Facebook::api('/me/likes','GET');