hayabhay / django-facebook-messenger-bot-tutorial

Code for my Tutorial on building a Facebook Messenger bot using Django/Python
https://abhaykashyap.com/blog/post/tutorial-how-build-facebook-messenger-bot-using-django-ngrok
MIT License
71 stars 51 forks source link

self.request.GET['hub.verify_token'] error #10

Open AhsanSheraz opened 4 years ago

AhsanSheraz commented 4 years ago
def get(self, request, *args, **kwargs):
        try:
            print(self.request.GET)
            token = self.request.GET['hub.verify_token']
        except MultiValueDictKeyError:
            print("hhhhhhhhhh")
            token = False

        if token == VERIFY_TOKEN:
            return HttpResponse(self.request.GET['hub.challenge'])
        else:
            return HttpResponse('Error, invalid token')

it returned <QueryDict: {}>