使用Django / Python为Facebook应用程序创建一个Like-Gate(显示选项卡) [英] Creating a Like-Gate (reveal tab) for a Facebook app, using Django/Python
问题描述
我想为应用程序建立一个喜欢门。我希望应用程序检测用户是否喜欢粉丝页面,然后才能查看其大部分内容。我还没有找到一个很好的解决方案。
我很在意使用像PyFacebook这样的东西。有人可以建议一个好的选择吗?谢谢。
Fandjango包裹脸庞,这实际上更容易。仅通过pip安装Fandjango以避免冲突。
在请求对象的视图中,您可以简单地检查
request.facebook.signed_request.page.is_liked
并执行不同的操作。请记住,如果应用程序不在页面中,该页面将为无。
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" for the app. I'd like the app to detect whether the user has "liked" a Fan page before they can view the bulk of it. I haven't found a good solution for that yet.
I'm wary of using something like PyFacebook. Can someone suggest a good option? Thanks.
Fandjango wraps facepy so it's actually easier. Install only Fandjango via pip to avoid conflicts.
In the view with the request object, you can simply check against
request.facebook.signed_request.page.is_liked
and perform different actions. Remember that page will be None if the app is not in a page.
这篇关于使用Django / Python为Facebook应用程序创建一个Like-Gate(显示选项卡)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!