python oauth2和facebook上的任何提示。Django/Python oauth2 for facebook
自Facebook更新爲OAuth2以來似乎沒有什麼信息。
無論如何,現有的Twitter庫可以用來套裝Facebook身份驗證嗎?
import oauth2 as oauth
# Create your consumer with the proper key/secret.
consumer = oauth.Consumer(key="your-twitter-consumer-key",
secret="your-twitter-consumer-secret")
# Request token URL for Twitter.
request_token_url = "http://twitter.com/oauth/request_token"
# Create our client.
client = oauth.Client(consumer)
# The OAuth Client request works just like httplib2 for the most part.
resp, content = client.request(request_token_url, "GET")
print resp
print content
謝謝,我也找到了最好的解決方案,讓我成爲django-social-auth,我們將所有額外的信息傳回給我,比如oauth令牌等。 – ApPeL 2011-12-21 08:21:33