I’m using below code to publish a flv file on Facebook wall.
$description=$imgdetails;
$href="http://www.abc.net";
$src="http://www.abc.net/test.flv";
$attachment = array(
'name' => $name,
'href' => $href,
'description' => $description,
'media' => array(array('type' => 'video',
'video_src' => "http://www.abc.com/test.flv",
'preview_img' => 'http://www.abc.com/logo.png',
'href' => $href)));
$action_links = array( array('text' => 'Visit Us', 'href' => 'http://www.abc.com'));
$attachment = json_encode($attachment);
$action_links = json_encode($action_links);
$target_id = "********";
if( $facebook->api_client->stream_publish($message, $attachment, $action_links)) {
echo "Added on FB Wall";
}
above code successfully post the video on Facebook wall but when i try to play the video nothing happens even video file exist on specified URL. What am doing wrong ?
thanks in advance.
you are posting link of video to fb instead of video.
For video upload use video.upload method. This way only link will be uploaded not video.