Facebook Video Upload NEED FIX $30

Status
Not open for further replies.

baokyrox

BANNED
Joined
Oct 10, 2008
Messages
428
Reaction score
34
Code:
<?php 
$app_id = "223970924093";
$app_secret = "a69faca3c708c0cb5b6dccb585f0ce4b"; 
$my_url = "http://www.animeshippuuden.com"; 
$video_title = "YOUR_VIDEO_TITLE";
$video_desc = "YOUR_VIDEO_DESCRIPTION";

$code = $_REQUEST["code"];

if(empty($code)) {
   $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" 
     . $app_id . "&redirect_uri=" . urlencode($my_url) 
     . "&scope=publish_stream";
    echo("<script>top.location.href='" . $dialog_url . "'</script>");
}

$token_url = "https://graph.facebook.com/oauth/access_token?client_id="
    . $app_id . "&redirect_uri=" . urlencode($my_url) 
    . "&client_secret=" . $app_secret 
    . "&code=" . $code;
$access_token = file_get_contents($token_url);
 
$post_url = "https://graph-video.facebook.com/me/videos?"
    . "title=" . $video_title. "&description=" . $video_desc 
    . "&". $access_token;

//CURL CODES START

    $ch = curl_init();
    $data = array('name' => 'file', 'file' => '@'.realpath("processing.mp4"));// use realpath
    curl_setopt($ch, CURLOPT_URL, $post_url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    $res = curl_exec($ch);

    if (curl_errno($ch) == 60) { // CURLE_SSL_CACERT
        curl_setopt($ch, CURLOPT_CAINFO,
                  dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); // path to the certificate
        $res = curl_exec($ch);
    }

    if( $res === false ) {
        echo curl_error($ch);
    }
    curl_close($ch);

//CURL ENDS

?>

Here is my facebook code, i got an app created also i got the secret key for the app, also i obtain the access token but the issue is my video which reside in my web server by the name processing.mp4 with full path /home/animeshi/public_html/processing.mp4

but it doesnt load to facebook, i already grant permission.

if you can fix this within 1-2 hrs msg me.

Offer : $30 usd
by Paypal
 
Status
Not open for further replies.
This thread has been auto closed due to the forum's thread age policy. Read more.
Back
Top