'facebook.video.upload', 'v' => '1.0', 'api_key' => $appapikey, 'call_id' => microtime(true), 'format' => 'JSON', 'session_key' => $session_key, 'title' => 'My video title', 'description' => 'My video description' ); ksort($args); $sig = ''; foreach($args as $k => $v) { $sig .= $k . '=' . $v; } $sig .= $appsecret; $args['sig'] = md5($sig); $args["short.wmv"] = '@E:\path\to\short.wmv'; $ch = curl_init(); $url = 'http://api-video.facebook.com/restserver.php?method=facebook.video.upload'; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $args); $data = curl_exec($ch); print_r($data); //returned xml here ?>