简体   繁体   English

没有PHP的Facebook服务器端登录

[英]Facebook server-side login without PHP

I'm doing a project for some college work and trying to integrate facebook with their server-side login feature: https://developers.facebook.com/docs/howtos/login/server-side-login/ 我正在为一些大学工作做一个项目,并尝试将Facebook与他们的服务器端登录功能集成: https : //developers.facebook.com/docs/howtos/login/server-side-login/

The only problem is its explained for PHP and I'm using python. 唯一的问题是针对PHP的解释,我正在使用python。 I had a look at the overview of how it works using redirects and I intend on using the urllib2 to do HTTP requests to facebook for the whole process. 我对使用重定向的工作原理进行了概述,并打算在整个过程中使用urllib2向Facebook发送HTTP请求。

Can anyone give me a translation from PHP to Python or even pseudo-code that describes what I have to do, as I have no idea what all these PHP functions do, so I don't really know how to go about writing something equivalent to. 谁能给我一个从PHP到Python或什至是伪代码的翻译,以描述我必须做的事情,因为我不知道所有这些PHP函数的作用,所以我真的不知道该怎么写相当于。

Thanks, Sam 谢谢山姆

I've done it in Ruby, but this looks like a good start. 我已经在Ruby中做到了,但这看起来是一个不错的开始。

http://facebook-python-library.docs-library.appspot.com/facebook-python/examples/oauth.html http://facebook-python-library.docs-library.appspot.com/facebook-python/examples/oauth.html

And something similar was asked and it seems like there are helpful links 有人问了类似的问题,似乎有帮助的链接

What python library I should use for facebook OAuth and OpenGraph 我应该为Facebook OAuth和OpenGraph使用什么Python库

I have a python library that does this: 我有一个这样做的python库:

It's on PyPi as well. 它也在PyPi上。

The main file shows how you'd integrate it on the serverside and template for Pyramid. 主文件显示了如何将其集成在服务器端和Pyramid的模板上。 Doing it in Django, Flask, whatever would be similar. 可以在Django,Flask中进行类似的操作。

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

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