0

我在使用Wit.ai構建Node.js ChatBot,我只想知道是否有可能在用戶打開Messenger上的共享部分時跟蹤用戶操作。
Facebook API發送element_share載荷?

"recipient":{ 
    "id":"USER_ID" 
    }, 
    "message":{ 
    "attachment":{ 
     "type":"template", 
     "payload":{ 
     "template_type":"generic", 
     "elements":[ 
      { 
      "title":"Breaking News: Record Thunderstorms", 
      "subtitle":"The local area is due for record thunderstorms over the weekend.", 
      "image_url":"https://thechangreport.com/img/lightning.png", 
      "buttons":[ 
       { 
       "type":"element_share" 
       }    
      ] 
      } 
     ] 
     } 
    } 
    } 


沒有回傳,沒有有效載荷發送給聊天機器人,所以我怎麼能做到這一點嗎?

回答

0

Messenger api目前沒有辦法檢測用戶共享一個項目。

您可以通過參數加載共享URL來識別用戶,並在加載頁面時在服務器上偵聽它們。這可能有助於將用戶分享給用戶。

還有Messenger Extensions sdk,它可以在您的網站上用戶get the page scoped id