I\'m building a Facebook app using Python/Django. I\'ve installed FanDjango and that works great. Just one more thing I need.
I\'d like to build a \"like-gate\" fo
I'm no Facebook expert, and haven't played that much with the Facebook graph, but this should work.
Once you've authenticated the user, you can get their likes off the Facebook Graph:
https://graph.facebook.com/me/likes/{your_contents_graph_id}?access_token={access_token}
In Python I might query this via:
import requests
url = "https://graph.facebook.com/me/likes/{your_contents_graph_id}?access_token={access_token}".format(your_contents_graph_id=your_contents_graph_id, access_token=access_token)
r = request.get(url)
if r.status_code == '200':
page_liked = True
else:
page_liked = False
All this said, I wouldn't like your content. It's not appropriate for me or anyone else to like something they haven't reviewed in full. You might want to consider an alternative way to get people to look at your content.