我在createGetStarted()
方法中使用app.listen()
,它出现并且操作正常但按钮只是在白色按钮顶部的蓝色可悬停文本,没有边框。基本上只是文本链接,而不是按钮。可能是什么问题?
我有这种方法来调用适当的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);
}