video post on timeline not playing inline

I have a problem when posting video through my app on users with TimeLine profile. the post appears very small and when clicked the video opens on a new tab instead of playing inside facebook.

Here are some details :

I'm building an application that create customized videos (SWF) and post them on a user's friend wall. I'm "wrapping" the SWF file in an HTML file that include the following "meta og:" tags -

    <meta property="fb:app_id" content="******" />
    <meta property="og:url" content="THIS PAGE URL" />
    <meta property="og:title" content="Title" /> 
    <meta property="og:description" content="some description" /> 
    <meta property="og:type" content="video" />
    <meta property="og:image" content="an img url" />   
    <meta property="og:video" content="URL TO THE SWF FILE" />  
    <meta property="og:video:type" content="application/x-shockwave-flash" />
    <meta property="og:video:width" content="396" />
    <meta property="og:video:height" content="297" />
    <meta property="og:site_name" content="pickle-games" />

and then in the body i embed the SWF using the "embed" tag.
You can see an example by viewing the source of http://pickle-games.com/BigBully/hitVideo.php?hit_id=1327242593&hit=hit2

I'm using the facebook PHP SDK to post on the wall like this :

$facebook->api("/" . $uid . "/feed", "POST",
                        array(
                        'link' => $server_url . 'hitVideo.php?hit='. $hit . "&hit_id=".$hit_id ."&u_name=" . $u_name . "&f_name=". $f_name                  
                             ));

When posting on a user with the old profile (not the timeline) everything works fine and the video plays inline, on the wall.

The problem, as mentioned above, is only when posting on a user that uses the TimeLine profile

BTW - if i share the link manually (not through my app) on the friend's timeline then everything works fine...

What am i missing? How do i post it through my app in a way that it will work also on the timeline? Thanks.


Try this

$attachment = array(
        'message' => 'SOMETHING HERE!',
        'name' => 'name!',
        'caption' => 'caption!',
        'link' => 'http://link.com',
        'description' => 'description here!',
        'access_token' => $request["oauth_token"],
        'picture' => 'http://link.com/image.jpg',
        'source' => 'link.com/flash.swf',
        'actions' => array(array('name' => 'some action',
                          'link' => 'https://link.com/'))
);      

$result = $facebook->api('/'.$friend_id.'/feed/','post',$attachment);

It is very important to put something in the 'message' or else is going to give you that same error...


Just a note, if you do not have

<meta property="fb:app_id" content="xxxxxxxxxxxxxxxx" />

When posted to the wall, the video will open in a NEW window.

链接地址: http://www.djcxy.com/p/10358.html

上一篇: 我如何检测一个目录是否可以在Ruby中写入

下一篇: 时间轴上的视频文章不能内嵌播放