Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9183257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:45:30+00:00 2026-06-17T18:45:30+00:00

I have seen an example in facebook documentation. $post_url = https://graph-video.facebook.com/me/videos? . title= .

  • 0

I have seen an example in facebook documentation.

$post_url = "https://graph-video.facebook.com/me/videos?"
. "title=" . $video_title. "&description=" . $video_desc 
. "&". $access_token;

But i want to do this in facebook php-sdk.

$facebook->api('/me/videos/');

But it seems the video server is https://graph-video.facebook.com.
So how do i do this in graph api using php-sdk?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:45:31+00:00Added an answer on June 17, 2026 at 6:45 pm

    through graph its much more simple

    To a group you can do this:

    <?php
    $app_id = "YOUR_APP_ID";
    $app_secret = "YOUR_APP_SECRET";
    $my_url = "YOUR_POST_LOGIN_URL";
    $video_title = "TITLE FOR THE VIDEO";
    $video_desc = "DESCRIPTION FOR THE VIDEO";
    $group_id = "YOUR_GROUP_ID";
    
    $code = $_REQUEST["code"];
    
    echo '<html><body>';
    
    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/" . $group_id . "/videos?"
        . "title=" . $video_title. "&description=" . $video_desc
        . "&". $access_token;
    
    echo '<form enctype="multipart/form-data" action=" '.$post_url.' "  
         method="POST">';
    echo 'Please choose a file:';
    echo '<input name="file" type="file">';
    echo '<input type="submit" value="Upload" />';
    echo '</form>';
    
    echo '</body></html>';
    ?>
    

    to a page you can do this

    <?php
    $app_id = "YOUR_APP_ID";
    $app_secret = "YOUR_APP_SECRET";
    $my_url = "YOUR_POST_LOGIN_URL";
    $video_title = "TITLE FOR THE VIDEO";
    $video_desc = "DESCRIPTION FOR THE VIDEO";
    $page_id = "YOUR_PAGE_ID"; // Set this to your APP_ID for Applications
    
    $code = $_REQUEST["code"];
    
    echo '<html><body>';
    
    if(empty($code)) {
      // Get permission from the user to publish to their page. 
      $dialog_url = "http://www.facebook.com/dialog/oauth?client_id="
        . $app_id . "&redirect_uri=" . urlencode($my_url)
        . "&scope=publish_stream,manage_pages";
      echo('<script>top.location.href="' . $dialog_url . '";</script>');
    } else {
    
      // Get access token for the user, so we can GET /me/accounts
      $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);
    
      $accounts_url = "https://graph.facebook.com/me/accounts?" . $access_token;
      $response = file_get_contents($accounts_url);
    
      // Parse the return value and get the array of accounts we have
      // access to. This is returned in the data[] array. 
      $resp_obj = json_decode($response,true);
      $accounts = $resp_obj['data'];
    
      // Find the access token for the page to which we want to post the video.
      foreach($accounts as $account) {
           if($account['id'] == $page_id) {
             $access_token = $account['access_token'];
             break;
           }
      }
    
      // Using the page access token from above, create the POST action
      // that our form will use to upload the video.
      $post_url = "https://graph-video.facebook.com/" . $page_id . "/videos?"
          . "title=" . $video_title. "&description=" . $video_desc
          . "&access_token=". $access_token;
    
      // Create a simple form 
      echo '<form enctype="multipart/form-data" action=" '.$post_url.' "  
           method="POST">';
      echo 'Please choose a file:';
      echo '<input name="file" type="file">';
      echo '<input type="submit" value="Upload" />';
      echo '</form>';
    }
    
    echo '</body></html>';
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have seen this example on the web: $('#questionTextArea').each( function() { var $this =
I have seen the example here . All well and good and I understand
Please give me some examples of jump table usage. I have seen this example
I have seen in a few libraries, Spray for example, dual package specifications like
I have often seen the spinning gears OpenGL example ( I think originally done
I have seen many example of binary search,many method how to optimize it,so yesterday
I have seen in some websites like facebook, twitter and youtuBe. Codes are being
I have seen example code like this before class C { C(); ~C(); foo(T1,
I have seen example code that looks like this, which seems perfectly reasonable: [Authorize(Roles
i have seen some example of doing it but i still can't understand and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.