uploading mp4 video using curl to facebook

╄→гoц情女王★ 提交于 2019-12-25 00:23:26

问题


I have a simple bot in my facebook website, I want to upload mp4 video so that I can use it to my bot according to this doc upload via url here is what I have done so far.

curl -X POST -H "Content-Type: application/json" -d '{
{
  "message":{
    "attachment":{
      "type":"video", 
      "payload":{
        "is_reusable": true,
        "url":"https://cdn-b-east.streamable.com/video/mp4/ll7ht.mp4?token=3Oue4umXi5OZYxVcpgh61w&expires=1546136854"
      }

    }
  }
}
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=MY TOKEN GOES HERE"

Unfortunatelly when I run the above code in my bash terminal I get the following error :

{
    "error": {
        "message": "(#100) Requires one of the params: get_started,persistent_menu,target_audience,whitelisted_domains,greeting,account_linking_url,payment_settings,home_url",
        "type": "OAuthException",
        "code": 100,
        "fbtrace_id": "FK6F4slf7IZ"
    }
}

What is wrong with my code? any help will be appreciated thanks

来源:https://stackoverflow.com/questions/53978285/uploading-mp4-video-using-curl-to-facebook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!