node-fb-messenger icon indicating copy to clipboard operation
node-fb-messenger copied to clipboard

Cannot build persistent menu

Open Notekunn opened this issue 4 years ago • 0 comments

My code:

messenger.setPersistentMenu({
    pageId: app.get('page_id'),
    menuItems: [{
        type: "postback",
        title: "Talk to an agent",
        payload: "CARE_HELP"
    },
    {
        type: "postback",
        title: "Outfit suggestions",
        payload: "CURATION"
    },
    {
        type: "web_url",
        title: "Shop now",
        url: "https://3000-c5d48a10-3ffd-4635-b0e9-36c6e897295d.ws-us02.gitpod.io/",
        webview_height_ratio: "full"
    }],
    // token: app.get('admin_token')
})
    .then(console.log)
    .catch(console.log)

It throw Error

{
  error: {
    message: '(#200) User does not have sufficient administrative permission for this action on this page. If the page business requires Two Factor Authentication, the user also needs to enable Two Factor Authentication.',
    type: 'OAuthException',
    code: 200,
    fbtrace_id: 'ADYHrfkOhmngibbxuEQclAr'
  }
}

Notekunn avatar Jul 06 '20 01:07 Notekunn