【发布时间】:2017-05-06 07:47:35
【问题描述】:
我在app.listen() 方法中使用createGetStarted(),它出现并且操作正常,但按钮只是白色按钮顶部的蓝色可悬停文本,没有边框。基本上只是一个文本链接,而不是一个按钮。可能是什么问题?
我有这个方法可以调用相应的 API:
function callThreadSettingsAPI(data) { //Thread Reference API
request({
uri: 'https://graph.facebook.com/v2.6/me/thread_settings',
qs: { access_token: PAGE_ACCESS_TOKEN },
method: 'POST',
json: data
}, function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log("Thread Settings successfully changed!");
} else {
console.error("Failed calling Thread Reference API", response.statusCode, response.statusMessage, body.error);
}
});
}
此方法创建 json:
function createGetStarted() {
var data = {
setting_type: "call_to_actions",
thread_state: "new_thread",
call_to_actions:[
{
payload:"getStarted"
}
]
};
callThreadSettingsAPI(data);
}
【问题讨论】:
标签: javascript node.js bots facebook-messenger