0
votes

I am using Facebook unity sdk 7.0.2 I am trying to share a link to my canvas game with a mediasource to my youtube video channel.

When I set mediaSource to http://www.youtube.com/e/xxxxxxx&autoplay=1 the link gets shared, and the picture appears, but there is no play button and no video, so when I click the link I am forwarded to my 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);

I tried to create an html with og:type set to video and upload it to my server, then set the mediasource to the new html file, in that case I just get a blank picture and a link to my 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" />

Is there a way to share a link to canvas application with an embedded youtube video?

Thanks for advance.

1

1 Answers

1
votes

Almost there, try removing media source, and setting the link parameter to your OG object you hosted on your server.