Fetching facebook data once logged in using django-social-auth

﹥>﹥吖頭↗ 提交于 2020-01-01 09:54:31

问题


We've set up an application that uses the django-social-auth extension to authenticate users with Facebook. The authentication works fine, but we are not clear on how to go about fetching useful information from Facebook (friends lists, likes, etc.) It appears that django-facebook handles some of this functionality, but also handles the authorization aspects. Is there an application that would sit neatly on top of django-social-auth and provide a framework for using facebook data? Using django-social-auth and django-facebook together seems kludgy.


回答1:


You might want to look into facepy. You could use the Facebook oAuth access token that django-social-auth saves in your database and make whichever Graph API calls your application is permitted to make for the given user.




回答2:


It shouldn't be too hard to roll it yourself. The Facebook graph API is just HTTP get requests with the access_token, and it returns JSON data.



来源:https://stackoverflow.com/questions/8864557/fetching-facebook-data-once-logged-in-using-django-social-auth

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!