【发布时间】:2016-04-20 15:56:43
【问题描述】:
我想将带有虚拟数据的收据发送给用户。
我使用this library,它简化了向 Facebook 发送消息的过程。
我的payload结构是这样的:
var payload = {
template_type: 'receipt',
recipient_name: '@' + user.name + ' ' + user.surname,
order_number: (new Date).getTime(),
currency: 'USD',
payment_method: 'Наличными',
order_url: 'http://www.example.com',
timestamp: (new Date).getTime() + '',
elements: [
{
title: title,
subtitle: subtitle,
quantity: 1,
price: 20,
currency: 'USD',
image_url: image_url
}
],
address: {
street_1:"Nurly tau",
street_2:"",
city:"Almaty",
postal_code:"050000",
state:"KZ",
country:"KZ"
},
summary: {
subtotal: 20,
shipping_cost: 0,
total_tax: 0,
total_cost: 20
},
adjustments: []
};
我刚刚用简单的虚假数据填写了收据字段。此外,Facebook 会跟踪所有已发送回执中 order_numbers 的唯一性。
当我尝试发送此收据时,我收到一条错误消息:
{ message: '(#1200) Temporary send message failure. Please try again later',
type: 'OAuthException',
code: 1200,
fbtrace_id: 'BHmHRCEQUC4' }
这个错误是什么意思? Facebook 的错误信息如此神秘?
【问题讨论】:
标签: javascript node.js facebook facebook-messenger