Facebook graph api 如何";使用“视频”创建帖子;使用Facebook API?
我正在尝试在我的粉丝页面上创建一个新帖子,其中包含一个已经上传和发布的视频。进入页面菜单->“发布工具”->“视频库”可以单击已发布的视频并制作新帖子,但我不知道如何使用Facebooks API创建新的帖子+视频。解决了Facebook graph api 如何";使用“视频”创建帖子;使用Facebook API?,facebook-graph-api,video,Facebook Graph Api,Video,我正在尝试在我的粉丝页面上创建一个新帖子,其中包含一个已经上传和发布的视频。进入页面菜单->“发布工具”->“视频库”可以单击已发布的视频并制作新帖子,但我不知道如何使用Facebooks API创建新的帖子+视频。解决了 url = "https://graph.facebook.com/v2.9/me/videos" title = "some title" #post title description = "some description" #post
url = "https://graph.facebook.com/v2.9/me/videos"
title = "some title" #post title
description = "some description" #post description
crossposted_video_id = "12344444" #get the video ID and grab it here!
content_category = "LIFESTYLE" #there are some more categories to use in fb
scheduled_publish_time = "" #in unix format
published = "false" #if you want to schedule, set "false"
token = "page access token" #you can get one in Graph API Explorer
param = {
"crossposted_video_id": crossposted_video_id,
"title": title,
"description": description,
"content_category": content_category,
"scheduled_publish_time": scheduled_publish_time,
"published": published,
"access_token": token
}
r = requests.post(url, json=param)