1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Facebook Video Upload NEED FIX $30

Discussion in 'Hire a Freelancer' started by baokyrox, Oct 29, 2011.

  1. baokyrox

    baokyrox BANNED BANNED

    Joined:
    Oct 10, 2008
    Messages:
    429
    Likes Received:
    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
     
  2. aleks.stanko

    aleks.stanko Newbie

    Joined:
    Feb 11, 2012
    Messages:
    15
    Likes Received:
    0
    Occupation:
    Graphic/Web Design
    Still open?
     
  3. Rajthepositivelife

    Rajthepositivelife Elite Member Premium Member

    Joined:
    Feb 9, 2010
    Messages:
    1,786
    Likes Received:
    441
    Occupation:
    Director
    Location:
    India
    Home Page:
    Are you just trying to increase your post counts????

    You have commented on a 2.5 months old message?
     
    • Thanks Thanks x 1