broidHQ / integrations

Connect your App to Multiple Messaging Channels with the W3C Open standard.
https://www.broid.ai
GNU Affero General Public License v3.0
746 stars 83 forks source link

Error 400 with broid-messenger due to nonexisting field "name" for user #73

Closed acailly closed 7 years ago

acailly commented 7 years ago

Overview

Steps to Reproduce

Talk to my bot

Observed

Something went wrong: 400 - {"error":{"message":"(#100) Tried accessing nonexisting field (name) on node type (MessengerPageScopedID)","type":"OAuthException","code":100,"fbtrace_id":"EH1sMyJphfS"}}

broid-messenger tries to get some fields relative to connected user. These are name, first_name, last_name (see adapter.js line 202).

I checked the properties available from my account with the following request:

GET https://graph.facebook.com/v2.8/<myid>?&access_token=<mytoken>

and I get:

{
   "first_name": <value>,
   "last_name": <value>,
   "profile_pic": <value>,
   "locale": <value>,
   "timezone": <value>,
   "gender": <value>
}

No sign of name field.

Expected

Is the name field really needed. I tried to run a bot with botpress.io and it worked well so the problem is not with my account. Maybe first_name and last_name is sufficient ?

killix commented 7 years ago

i can't repro the bug. But it's a good idea to replace name by first_name and last_name.