Post swf with parameters to facebook via application

Go To


I have a facebook application where the user choose 4 of his friends and then it creates a video (swf) with the pictures of your friends in it (loaded via xml). So I need to share this video on the user timeline. Everything works fine but the video is not embedded in the post on his timeline, there is only a post with the link to the page in it.

The weird thing is, if I post the url directly on my timeline, the video is embedded, but not if the same link is posted via the application.

here is my code called by the share button in js :

function postToFeed() {
    var obj = {
      method: 'feed',
      link: '',
      picture: '',
      name: 'Name',
      caption: 'Caption',
      description: 'Description'

    function callback(response) {
      //some code here

    FB.ui(obj, callback);

and the code in my share-page.php


$id_inscription = $_GET['id'];

$video_url = '';
$video_preview_image = '';


<!DOCTYPE html>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="content-language" content="en">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

<meta property="og:video" content="<?php echo $video_url; ?>"/>

<!-- Open grah tags for Facebook -->
<meta property="og:title" content="Test video player" />
<meta property="og:description" content="A video player interface experiment." />
<meta property="og:type" content="video" />
<meta property="og:url" content="<?php echo $video_url; ?>"/>
<meta property="og:image" content="<?php echo $video_preview_image; ?>"/>
<meta property="og:site_name" content="Site name"/>

<!-- Video specific open graph tags -->
<meta property="og:video" content="<?php echo $video_url; ?>" />
<meta property="og:video:secure_url" content="<?php echo $video_url; ?>" /> <!-- Required for people on Facebook who have secure browsing enabled! -->
<meta property="og:video:width" content="325" />
<meta property="og:video:height" content="180" />
<meta property="og:video:type" content="application/x-shockwave-flash" />

<script src="js/swfobject.js"></script>
    var flashvars = {
        xmlUrl:"xml/data-<?php echo $id_inscription; ?>.xml",
    var params = {
        menu: "false",
        scale: "noScale",
        allowFullscreen: "true",
        allowScriptAccess: "always",
        bgcolor: "",
        wmode: "opaque"
        //wmode: "direct" // can cause issues with FP settings & webcam
    var attributes = {
        "altContent", "480", "270", "10.0.0",
        flashvars, params, attributes);

<div id="altContent">
    <p><a href="">Get Adobe Flash player</a></p>

2012-04-04 19:35
by Alex Beauchemin


Found it, in the javascript you have to add

source: ''
2012-04-05 13:49
by Alex Beauchemin


DOesnt work for me . Also facebook says ,It is NOT supposed to work By Design .

Please share here your code snippet if you could make it work . I have the meta tags taking care for the secure video Url as well .

2014-04-26 04:47
by Vikash Singhal