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

Can't get user name #3

Closed BlueFRJ closed 7 years ago

BlueFRJ commented 7 years ago

Hi! When I run the code, it works fine until I send a message to the bot, when I get this error:

joke_text = 'Yo '+user_details['first_name']+'..!' + joke_text KeyError: 'first_name'

And facebook returns this:

> {u'error': {u'message': u'Invalid OAuth access token.', u'code': 190, u'type': u'OAuthException', u'fbtrace_id': u'HcT2M7LgPTY'}}
> {u'error': {u'code': 100,
>             u'error_subcode': 2018001,
>             u'fbtrace_id': u'ANUjQzx/PUi',
>             u'message': u'(#100) No matching user found',
>             u'type': u'OAuthException'}}

So, I don't know what to do know, as user's name is really important for my idea. Thanks in advice

Nielssie commented 7 years ago

You have to set the value for PAGE_ACCESS_TOKEN =