Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def home(request):
- user = request.user
- fb_authenticated = False
- if user.is_authenticated() and hasattr(user, 'facebook_profile'):
- fb_authenticated = user.facebook_profile.is_authenticated()
- if fb_authenticated:
- logged_user = request.facebook.users.getLoggedInUser()
- if not request.facebook.users.hasAppPermission(ext_perm='email', uid=logged_user):
- request.facebook.request_extended_permission("email", popup=True)
- kwargs = {
- 'fb_authenticated' : fb_authenticated,
- 'fb_uid' : request.facebook.uid,
- }
- c = RequestContext(request, kwargs)
- return render_to_response('home.html', context_instance=c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement