我正在使用Facebook unity SDK 7.0.2
我正在尝试与我的youtube视频 channel 的媒体源共享指向我的 Canvas 游戏的链接。
当我将mediaSource设置为http://www.youtube.com/e/xxxxxxx&autoplay=1时,链接将被共享,并显示图片,但是没有播放按钮和视频,因此,当我单击链接时,会将我转发到 Canvas 。
var publishData =
new Dictionary<string, string>() { { "link", link },
{ "picture", pictureLink },
{ "name", linkName },
{ "caption", linkCaption },
{ "description", linkDescription },
{ "source", mediaSource },
{ "ref", feedref },
};
FB.API("/me/feed", HttpMethod.POST, FacebookFeedLog, publishData);
我尝试创建og:type设置为video的html并将其上传到我的服务器,然后将mediasource设置为新的html文件,在这种情况下,我只会得到一张空白图片和一个指向 Canvas 的链接。
<meta property="fb:app_id" content="xxxxx" />
<meta property="og:type" content="video" />
<meta property="og:url" content="xxxx" />
<meta property="og:title" content="Watch video" />
<meta property="og:description" content="I am playing games, why not try it." />
<meta property="og:image" content="http://i2.ytimg.com/vi/xxxx/hqdefault.jpg" />
<meta property="og:video" content="http://www.youtube.com/e/xxxxautoplay=1" />
<meta property="og:video:width" content="398" />
<meta property="og:video:height" content="224" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
有没有一种方法可以与嵌入式YouTube视频共享 Canvas 应用程序的链接?
感谢前进。
最佳答案
几乎在那里,尝试删除媒体源,并将链接参数设置为服务器上托管的OG对象。
关于facebook - Facebook的统一SDK/用户/提要嵌入YouTube的链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32556173/