While following the tutorial to create a FB messenger bot I get a 400 error after validating my application by following the verification link.
~/Documents/Projects/original-coast-clothing % node app.js
WARNING: Missing the environment variable SHOP_URL
Your app is listening on port 3000
Is this the first time running?
Make sure to set the both the Messenger profile, persona and webhook by visiting:
https://stupi......./profile?mode=all&verify_token=test
Test your app by messaging:
https://m.me/xxx.....
Setting app xxxx.... callback url to https://stupid-....../webhook
messages, messaging_postbacks, messaging_optins, message_deliveries, messaging_referrals
Subscribing app xxxx to page xxxx
messages, messaging_postbacks, messaging_optins, message_deliveries, messaging_referrals
{ locale: 'default',
text:
'Welcome to Original Coast Clothing {{user_first_name}}! Click get started to enjoy our sample automated messaging experience. If you want to build a similar one visit https://fb.me/get-sample-oc' }
{ locale: 'fr_FR',
text:
'Bienvenue à Original Coast Clothing {{user_first_name}}! Cliquez sur démarrer pour voir notre exemple d’expérience de messagerie automatique. Si vous souhaitez en élaborer une semblable, visitez https://fb.me/get-sample-oc' }
{ locale: 'es_ES',
text:
'¡{{user_first_name}}, te damos la bienvenida a Original Coast Clothing! Haz clic para empezar a disfrutar de nuestra experiencia de mensajes automatizados de ejemplo. Si quieres crear una experiencia similar, visita https://fb.me/get-sample-oc' }
{ locale: 'es_LA',
text:
'¡Te damos la bienvenida a Original Coast Clothing, {{user_first_name}}! Haz clic para empezar a disfrutar de nuestra experiencia de mensajes automáticos de muestra. Si quieres crear una experiencia similar, visita https://fb.me/get-sample-oc' }
{ locale: 'pt_BR',
text:
'Bem-vindo(a) à Original Coast Clothing {{user_first_name}}! Clique em Começar para conferir nosso exemplo de experiência de mensagens automáticas. Se você deseja criar uma semelhante, acesse https://fb.me/get-sample-oc.' }
{ locale: 'id_ID',
text:
'Selamat datang di Original Coast Clothing {{user_first_name}}! Klik untuk mulai menikmati sampel pengalaman berkirim pesan otomatis kami. Jika Anda ingin membuat pengalaman serupa, kunjungi https://fb.me/get-sample-oc' }
{ locale: 'ar_AR',
text:
'مرحبًا بك في Original Coast Clothing {{user_first_name}}! انقر على بدء الاستخدام للاستمتاع بتجربة المراسلة التلقائية النموذجية التي نوفرها. وإذا كنت ترغب في إنشاء تجربة مماثلة، فتفضل بزيارة موقع https://fb.me/get-sample-oc على الويب' }
{ locale: 'de_DE',
text:
'Herzlich willkommen bei Original Coast Clothing, {{user_first_name}}! Klicke auf „Los geht’s“, um unser Beispiel für automatisierte Nachrichten zu entdecken. Wenn du ein ähnliches Kundenerlebnis anbieten möchtest, besuche die Seite https://fb.me/get-sample-oc.' }
{ locale: 'it_IT',
text:
'Ti diamo il benvenuto su Original Coast Clothing, {{user_first_name}}! Clicca su Inizia per provare i nostri messaggi automatici. Se vuoi creare un\'esperienza simile, visita https://fb.me/get-sample-oc.' }
{ locale: 'ja_JP',
text:
'{{user_first_name}}さん、Original Coast Clothingへようこそ![スタート]をクリックして、サンプルの自動メッセージングサービスをお試しください。同様のサービスを構築する場合はhttps://fb.me/get-sample-ocをご覧ください。' }
{ locale: 'ko_KR',
text:
'{{user_first_name}}님, 안녕하세요. Original Coast Clothing입니다! 시작하기를 클릭하여 샘플 자동 메시지 기능을 활용해보세요. 비슷한 메시지를 만들려면 visit https://fb.me/get-sample-oc를 방문하세요.' }
{ locale: 'ru_RU',
text:
'Добро пожаловать в магазин Original Coast Clothing, {{user_first_name}}! Нажмите "Начать", чтобы написать нашему боту. Хотите такой же бот? Перейдите по адресу https://fb.me/get-sample-oc.' }
{ locale: 'th_TH',
text:
'ยินดีต้อนรับสู่ Original Coast Clothing {{user_first_name}}! คลิกเริ่มต้นใช้งานเพื่อทดลองตัวอย่างประสบการณ์การส่งข้อความอัตโนมัติของเรา หากคุณต้องการสร้างประสบการณ์ที่คล้ายกัน โปรดไปที่ https://fb.me/get-sample-oc' }
{ locale: 'vi_VN',
text:
'Chào mừng bạn đến với Original Coast Clothing {{user_first_name}}! Hãy nhấp vào nút Bắt đầu để tận hưởng trải nghiệm nhắn tin mẫu và hoàn toàn tự động của chúng tôi. Nếu bạn muốn xây dựng trải nghiệm tương tự, hãy truy cập https://fb.me/get-sample-oc' }
{ locale: 'zh_CN',
text:
'欢迎来到 Original Coast Clothing{{user_first_name}}!点击“立即开始”进入我们的自动消息体验示例。如果您想打造类似的体验,请访问 https://fb.me/get-sample-oc' }
{ locale: 'zh_HK',
text:
'{{user_first_name}},歡迎來到 Original Coast Clothing!點擊「立即開始」,在範例中體驗我們的自動訊息功能。如果您想建立類似的自動訊息,請前往 https://fb.me/get-sample-oc' }
{ locale: 'zh_TW',
text:
'{{user_first_name}},歡迎來到 Original Coast Clothing!點擊「立即開始」,在範例中體驗我們的自動訊息功能。如果您想要建立類似的自動訊息,請前往 https://fb.me/get-sample-oc' }
{ locale: 'default',
composer_input_disabled: false,
call_to_actions:
[ { title: 'Customer Support',
type: 'nested',
call_to_actions: [Array] },
{ title: 'Outfit suggestions',
type: 'postback',
payload: 'CURATION' },
{ type: 'web_url',
title: 'Shop now',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'fr_FR',
composer_input_disabled: false,
call_to_actions:
[ { title: 'Service clientèle',
type: 'nested',
call_to_actions: [Array] },
{ title: 'Suggestions vestimentaires',
type: 'postback',
payload: 'CURATION' },
{ type: 'web_url',
title: 'Acheter maintenant',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'es_ES',
composer_input_disabled: false,
call_to_actions:
[ { title: 'Atención al cliente',
type: 'nested',
call_to_actions: [Array] },
{ title: 'Sugerencias de ropa',
type: 'postback',
payload: 'CURATION' },
{ type: 'web_url',
title: 'Comprar',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'es_LA',
composer_input_disabled: false,
call_to_actions:
[ { title: 'Atención al cliente',
type: 'nested',
call_to_actions: [Array] },
{ title: 'Sugerencias de ropa',
type: 'postback',
payload: 'CURATION' },
{ type: 'web_url',
title: 'Comprar',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'pt_BR',
composer_input_disabled: false,
call_to_actions:
[ { title: 'Suporte ao cliente',
type: 'nested',
call_to_actions: [Array] },
{ title: 'Sugestões de roupas',
type: 'postback',
payload: 'CURATION' },
{ type: 'web_url',
title: 'Compre agora',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'id_ID',
composer_input_disabled: false,
call_to_actions:
[ { title: 'Dukungan Pelanggan',
type: 'nested',
call_to_actions: [Array] },
{ title: 'Saran pakaian', type: 'postback', payload: 'CURATION' },
{ type: 'web_url',
title: 'Belanja sekarang',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'ar_AR',
composer_input_disabled: false,
call_to_actions:
[ { title: 'خدمة العملاء',
type: 'nested',
call_to_actions: [Array] },
{ title: 'اقتراحات لأطقم ملابس',
type: 'postback',
payload: 'CURATION' },
{ type: 'web_url',
title: 'تسوق الآن',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'de_DE',
composer_input_disabled: false,
call_to_actions:
[ { title: 'Kundensupport',
type: 'nested',
call_to_actions: [Array] },
{ title: 'Outfit-Vorschläge',
type: 'postback',
payload: 'CURATION' },
{ type: 'web_url',
title: 'Jetzt einkaufen',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'it_IT',
composer_input_disabled: false,
call_to_actions:
[ { title: 'Assistenza clienti',
type: 'nested',
call_to_actions: [Array] },
{ title: 'Suggerimenti sui look',
type: 'postback',
payload: 'CURATION' },
{ type: 'web_url',
title: 'Acquista ora',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'ja_JP',
composer_input_disabled: false,
call_to_actions:
[ { title: 'カスタマーサポート', type: 'nested', call_to_actions: [Array] },
{ title: 'コーディネートのおすすめ', type: 'postback', payload: 'CURATION' },
{ type: 'web_url',
title: '購入する',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'ko_KR',
composer_input_disabled: false,
call_to_actions:
[ { title: '고객 지원', type: 'nested', call_to_actions: [Array] },
{ title: '의상 추천', type: 'postback', payload: 'CURATION' },
{ type: 'web_url',
title: '지금 구매하기',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'ru_RU',
composer_input_disabled: false,
call_to_actions:
[ { title: 'Служба поддержки клиентов',
type: 'nested',
call_to_actions: [Array] },
{ title: 'Советы по выбору одежды',
type: 'postback',
payload: 'CURATION' },
{ type: 'web_url',
title: 'В магазин',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'th_TH',
composer_input_disabled: false,
call_to_actions:
[ { title: 'ฝ่ายบริการลูกค้า',
type: 'nested',
call_to_actions: [Array] },
{ title: 'คำแนะนำเกี่ยวกับชุด',
type: 'postback',
payload: 'CURATION' },
{ type: 'web_url',
title: 'เลือกซื้อเลย',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'vi_VN',
composer_input_disabled: false,
call_to_actions:
[ { title: 'Hỗ trợ khách hàng',
type: 'nested',
call_to_actions: [Array] },
{ title: 'Gợi ý về trang phục',
type: 'postback',
payload: 'CURATION' },
{ type: 'web_url',
title: 'Mua ngay',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'zh_CN',
composer_input_disabled: false,
call_to_actions:
[ { title: '客户支持', type: 'nested', call_to_actions: [Array] },
{ title: '穿搭建议', type: 'postback', payload: 'CURATION' },
{ type: 'web_url',
title: '去逛逛',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'zh_HK',
composer_input_disabled: false,
call_to_actions:
[ { title: '客戶支援團隊', type: 'nested', call_to_actions: [Array] },
{ title: '服裝建議', type: 'postback', payload: 'CURATION' },
{ type: 'web_url',
title: '立即購買',
url: '',
webview_height_ratio: 'full' } ] }
{ locale: 'zh_TW',
composer_input_disabled: false,
call_to_actions:
[ { title: '客戶支援團隊', type: 'nested', call_to_actions: [Array] },
{ title: '服裝建議', type: 'postback', payload: 'CURATION' },
{ type: 'web_url',
title: '立即購買',
url: '',
webview_height_ratio: 'full' } ] }
Setting Messenger Profile for app 729...
Fetching personas for app 729...
Enable Built-in NLP for Page 10702....
{ whitelisted_domains: [ 'https://stupid-....., '' ] }
Setting Messenger Profile for app 729757....
Request sent: {"error":{"message":"Your message couldn't be sent because it includes content that other people on Facebook have reported as abusive.","type":"OAuthException","code":368,"error_data":{"sentry_block_data":"xxxxxx-hSywduRlFJH3QBTPg4okGTF4P9EheWiojwmPzxr-xxxxx-KFepjESWg9Lisa0-PtdaBq_OJHqyr1AuaYNHiFTuo-udeTiL3wXh7ulkEV6U9eO_LHakeSiyRitFMLfOFtV6EPV95bH3o7hlsxqBthB4WbK3948cO7290Q","help_center_id":0},"error_subcode":1346003,"error_user_msg":"","fbtrace_id":"A6-xxxx"}}
{}
Creating a Persona for app xxx
Creating a Persona for app xxx
Creating a Persona for app xxx
Creating a Persona for app xxx
Request sent: { error:
{ message:
'Your message couldn\'t be sent because it includes content that other people on Facebook have reported as abusive.',
type: 'OAuthException',
code: 368,
error_data:
{ sentry_block_data:
'xxxx-m0SIDlFKfnkyrtjRsagOtkQ',
help_center_id: 0 },
error_subcode: 1346003,
error_user_msg: '',
fbtrace_id: 'AitVh0xI-xxxx' } }
Unable to create a persona: Error: 400
at Request.<anonymous> (/Users/janmeppe/Documents/Projects/original-coast-clothing/services/graph-api.js:250:20)
at Request.emit (events.js:198:13)
at Request.onRequestResponse (/Users/janmeppe/Documents/Projects/original-coast-clothing/node_modules/request/request.js:1066:10)
at ClientRequest.emit (events.js:198:13)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
at TLSSocket.socketOnData (_http_client.js:442:20)
at TLSSocket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11) [ <Buffer 7b 22 65 72 72 6f 72 22 3a 7b 22 6d 65 73 73 61 67 65 22 3a 22 59 6f 75 72 20 6d 65 73 73 61 67 65 20 63 6f 75 6c 64 6e 27 74 20 62 65 20 73 65 6e 74 ... > ]
{ Daniel: undefined }
Unable to create a persona: Error: 400
at Request.<anonymous> (/Users/janmeppe/Documents/Projects/original-coast-clothing/services/graph-api.js:250:20)
at Request.emit (events.js:198:13)
at Request.onRequestResponse (/Users/janmeppe/Documents/Projects/original-coast-clothing/node_modules/request/request.js:1066:10)
at ClientRequest.emit (events.js:198:13)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
at TLSSocket.socketOnData (_http_client.js:442:20)
at TLSSocket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11) [ <Buffer 7b 22 65 72 72 6f 72 22 3a 7b 22 6d 65 73 73 61 67 65 22 3a 22 59 6f 75 72 20 6d 65 73 73 61 67 65 20 63 6f 75 6c 64 6e 27 74 20 62 65 20 73 65 6e 74 ... > ]
{ Daniel: undefined, Riandy: undefined }
Unable to create a persona: Error: 400
at Request.<anonymous> (/Users/janmeppe/Documents/Projects/original-coast-clothing/services/graph-api.js:250:20)
at Request.emit (events.js:198:13)
at Request.onRequestResponse (/Users/janmeppe/Documents/Projects/original-coast-clothing/node_modules/request/request.js:1066:10)
at ClientRequest.emit (events.js:198:13)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
at TLSSocket.socketOnData (_http_client.js:442:20)
at TLSSocket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11) [ <Buffer 7b 22 65 72 72 6f 72 22 3a 7b 22 6d 65 73 73 61 67 65 22 3a 22 59 6f 75 72 20 6d 65 73 73 61 67 65 20 63 6f 75 6c 64 6e 27 74 20 62 65 20 73 65 6e 74 ... > ]
{ Daniel: undefined, Riandy: undefined, Laura: undefined }
Unable to create a persona: Error: 400
at Request.<anonymous> (/Users/janmeppe/Documents/Projects/original-coast-clothing/services/graph-api.js:250:20)
at Request.emit (events.js:198:13)
at Request.onRequestResponse (/Users/janmeppe/Documents/Projects/original-coast-clothing/node_modules/request/request.js:1066:10)
at ClientRequest.emit (events.js:198:13)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
at TLSSocket.socketOnData (_http_client.js:442:20)
at TLSSocket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11) [ <Buffer 7b 22 65 72 72 6f 72 22 3a 7b 22 6d 65 73 73 61 67 65 22 3a 22 59 6f 75 72 20 6d 65 73 73 61 67 65 20 63 6f 75 6c 64 6e 27 74 20 62 65 20 73 65 6e 74 ... > ]
{ Daniel: undefined,
Riandy: undefined,
Laura: undefined,
Jorge: undefined }
Request sent: {"success":true}
Request sent: { error:
{ message:
'(#11) Setting of Nested Persistent Menu has been deprecated for v8.0 and higher',
type: 'OAuthException',
code: 11,
fbtrace_id: 'xxxxx' } }