Graph API post of video is not playable

前端 未结 2 494
心在旅途
心在旅途 2021-02-06 16:43

I have an application that posts music videos from YouTube to a Facebook user\'s wall. The post on Facebook would have this embed video be playable from Facebook. Recently it st

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-06 17:18

    Normally to share YouTube videos to Facebook pages you only need message, link, source, picture parameters. Even you can also skip the source, picture parameters if you wish to. Thats is if you are using FacebookC#SDK to share video to Facebook all you need is following code

     var fb = new Facebook.FacebookClient(yourPageAccessToken); 
     argList["message"] = message;
     argList["link"] = "http://www.youtube.com/watch?v=" + specialOffer.YoutubeId;
     argList["source"] = "http://www.youtube.com/v/" + specialOffer.YoutubeId;
     argList["picture"] = "http://img.youtube.com/vi/" + specialOffer.YoutubeId + "/0.jpg";
     fb.Post("feed", argList);
    

    or

     var fb = new Facebook.FacebookClient(yourPageAccessToken); 
     argList["message"] = message;
     argList["link"] = "http://www.youtube.com/watch?v=" + specialOffer.YoutubeId;
     fb.Post("feed", argList);
    

提交回复
热议问题