def get_fb_user_canvas(self, request):
        fb_user = None
        if request.POST.get('signed_request'):
            signed_request = request.POST["signed_request"]
            data = facebook.parse_signed_request(signed_request, settings.FACEBOOK_SECRET_KEY)
            if data and data.get('user_id'):
                fb_user = data['user']
                fb_user['method'] = 'canvas'
                fb_user['uid'] = data['user_id']
                fb_user['access_token'] = data['oauth_token']
        return fb_user
Attempt to find a user using a signed_request (canvas).
dataset/ETHPy150Open aidanlister/django-facebook/django_facebook/middleware.py/FacebookMiddleware.get_fb_user_canvas