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

I am trying to implement your application but it gives me error in importing 4 modules. #6

Closed likbz closed 7 years ago

likbz commented 7 years ago

fbbot/views.py", line 4, in import json, requests, random, re ImportError: No module named 'requests' Can you solve this?

hayabhay commented 7 years ago

You should install requests. If you've downloaded the contents of the repository, you can find "pip install -r requirements.txt" in the list of commands that you have to run. This will install requests.

likbz commented 7 years ago

I have connected your application and interacts with facebook, but the chat application does not return any answers, I have dedicated this afternoon but I have been a long time with this error, just as you can give me a solution. This is the message that returns me, the code is just as I have changed the tokens.

fbbot/views.py", line 73, in post post_facebook_message(message['sender']['id'], message['message']['text']) /fbbot/views.py", line 39, in post_facebook_message joke_text = 'Yo '+user_details['first_name']+'..! ' + joke_text KeyError: 'first_name