fbsamples / messenger-bot-samples

Messenger Bot Samples
Other
555 stars 441 forks source link

Messenger app not detected #41

Closed operman18 closed 5 years ago

operman18 commented 5 years ago

Hello,

I followed all steps included inside the readme for chat-extensions. But I always get the viewing outside messenger page. I tried on two different phones. I used those commands

heroku create
heroku addons:create heroku-postgresql
heroku config:set WEBHOOK_TOKEN='{MYSECRETTOKEN}'
heroku config:set APP_URL='{MYAPPURL}'
git subtree push --prefix chat-extensions/ heroku master

# I configured the app and the page details before executing those commands
heroku config:set PAGE_ACCESS_TOKEN='{MYAPPTOKEN}'
curl -X POST -H "Content-Type: application/json" -d '{  "whitelisted_domains":["{MYAPPURL}"]}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token={MYAPPTOKEN}"

I also whitelisted my app inside page setiings and sucessfully subscribe my webhook to the page. The bot can sends message and even display the regular heroku website when the app is destroyed. Screenshot_2019-05-17-14-26-40-155_com facebook orca

embee8 commented 5 years ago

Two things:

operman18 commented 5 years ago

Hi, I've checked the setup. I removed the whitelisting:

git checkout 09047858e453ba81839c8ee09c8b713d38ede31a
heroku create
heroku addons:create heroku-postgresql
heroku config:set APP_URL='{MYAPPURL}'
heroku config:set WEBHOOK_TOKEN='{MYSECRETTOKEN}'
git subtree push --prefix chat-extensions heroku master

# 1. I created a new app
# 2. I created a new page
# 3. I set up the webhook
# 4. I gave the app permission over the new page
# 5. I subscribed the page to the app's webhook
# 6. I removed generated my PAGE_ACCESS_TOKEN

heroku config:set PAGE_ACCESS_TOKEN='{MYPAGEACCESSTOKEN}'
embee8 commented 5 years ago

Closing this issue since the described behavior cannot be reproduced on the official project page which is deployed from this repository. If the issue persists, please also check this comment which describes the circumstances under which this error message can show up. Besides an incorrect domain whitelist, a missing app review would render the same message for users who are not associated with the app through an assigned role.