I've been searching some topics concerning facebook registration. Its just that i cant find any topics on how to save the user's facebook data to my users model.
Currently, users can Login successfully in my site.
here's my code:
base.html
<div id="fb-root"></div>
<script type="text/javascript开发者_运维问答">
window.fbAsyncInit = function() { FB.init({ appId : 'XXXXXXXXXXXXXX', status : true, cookie : true, xfbml : true }); };
(function() { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); }());
</script>
<fb:login-button autologoutlink="true" perms="email,user_birthday,status_update,publish_stream" ></fb:login-button>
My problem is i dont know how to get the Data from facebook and save it to may users model.
do you have any idea on how to solve this problem? your answers are highly appreciated. thank you..!
Does this help you: Facebook Connect: capturing user data with django-profiles and django-socialregistration or you need a more verbose answer?
EDIT:
that facebook.GraphAPI
thing can be imported from this: https://github.com/facebook/python-sdk/
精彩评论