2017-04-22 13 views
0

私はすでにアップロードされ投稿されたビデオを使ってファンページに新しい投稿を作成しようとしています。ページメニュー - > "公開ツール" - > "ビデオライブラリー"で、公開されたビデオをクリックして新しい投稿を作成することはできますが、Facebook APIを使ってこの新しい投稿+ビデオを作成する方法はわかりません。Facebook APIを使用して「ビデオ付き投稿を作成する」方法

+0

https://developers.facebook.com/docs/graph-api/video-uploads#crosspostedvideos – CBroe

+0

ありがとうございました! –

答えて

0

解決済み!

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) 
関連する問題