简体   繁体   English

我应该为Facebook OAuth和OpenGraph使用什么Python库

[英]What python library I should use for facebook OAuth and OpenGraph

I have designed a Facebook application and need to add OAuth, Open Graph for complete functionality. 我已经设计了一个Facebook应用程序,并且需要添加OAuth,Open Graph以获得完整的功能。 Considering that I know nothing about Open Graph and little JS, I'd like to use a small wrap-up (python lib) which will provide the those features.. 考虑到我对Open Graph和一点JS一无所知,我想使用一个小的包装(python lib)来提供这些功能。

I searched over Google, stackoverflow and found few projects which provide some cool features but I am unable to choose.. 我在Google,stackoverflow上进行了搜索,发现很少有提供一些很酷功能的项目,但我无法选择。

python libs: python库:

  1. django-social-auth Django的社会身份验证
  2. fandjango fandjango
  3. facepy facepy
  4. pyFacebook - I think this doesn't offer OAuth. pyFacebook-我认为这不提供OAuth。

I also use Google Data API in my project. 我还在我的项目中使用Google Data API。 So, the better option would be django-social-auth but I am not sure if I can do Open Graph with it.. 因此,更好的选择是django-social-auth,但我不确定是否可以使用它进行Open Graph。

Can anyone tell me what is the best, maintained, good lib? 谁能告诉我什么是最好的,保持好的库? (Please do mention if its not in the above list) (如果不在上面的列表中,请提及)

I would highly suggest django-social-auth. 我强烈建议django-social-auth。 Any library than can parse JSON will support Open Graph as FQL and Graph API data can all be retrieved from Facebook's API (REST). 任何无法解析JSON的库都将支持Open Graph,因为FQL和Graph API数据都可以从Facebook的API(REST)中检索。

Good luck! 祝好运!

django-social-auth is really great if you want to build a website that allows users to log in with Facebook, but if you're building an application on Facebook.com you probably want to use something like fandjango . 如果您想构建一个允许用户使用Facebook登录的网站,那么django-social-auth确实很棒,但是如果您要在Facebook.com上构建应用程序,则可能要使用fandjango类的fandjango Either way, you will need a different kind of library (like, say, facepy ) to interact with Facebook's API once you've retrieved an access token from the user. 无论哪种方式,一旦您从用户检索到访问令牌,您都将需要另一种类型的库(例如facepy )才能与Facebook的API进行交互。

Full disclosure: I am the author of fandjango and facepy . 全面披露:我是fandjangofacepy的作者。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM