Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 900
Shai Kerer Avatar asked Jan 26 '12 12:01

Shai Kerer


People also ask

Why do videos on Facebook look scrambled?

Distorted Playback: When your playback videos and the display colors get all scrambled up, it is a sign of videos not playing. An issue in the playback area of your video is a symptom of this error.

How do you fix embedded videos not playing on Chrome?

Open the Settings of Google Chrome. Go to the Privacy and Security category and open Site Settings. If the JavaScript is disabled, then you should enable it. Relaunch Chrome and play the video again.

Why are videos suddenly not playing?

YouTube videos won't play can happen due to various reasons like web browser issues, internet connection issues, computer issues, and YouTube bugs. How do I reset my YouTube? You can go to Settings > Apps > Apps > YouTube > Storage, and then click CLEAR DATA and CLEAR CACHE to reset your YouTube.


1 Answers

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...

like image 89
Gian Franco Olivieri Avatar answered Sep 30 '22 23:09

Gian Franco Olivieri