title: Unable to upload video to user's facebook account using Graph API
body: <p>I have created a facebook app in last month.</p>
  
  <p>I am trying to upload a video from my PHP code, but it throws an error that <code>(#353) You must select a video file to upload.</code> While I tried to upload the same video from my Facebook account directly and it gets uploaded properly.</p>
  
  <p><img src="https://i.stack.imgur.com/jV6PM.png" alt="enter image description here"></p>
  
  <p>I don't know what is wrong things that exists, PHP code is as below</p>
  
  <pre><code>$api="/me/videos";
              $uploaded_videos=$facebook-&gt;api($api);
  
              $video_file_path=$user_dir_abs_path."/NewProject20.mov";
  
              if(file_exists($video_file_path))
              { 
                  echo "file exists...";
              }else{
                die("not exist");
              }
  
  
               $ret_obj = $facebook-&gt;api('/me/videos', 'POST', array(
                  'source' =&gt; '@' . $video_file_path,
                  'title' =&gt; "This is just a test",
                  'description' =&gt; 'test9000',
                  'privacy' =&gt; json_encode(array('value' =&gt; 'EVERYONE' )),
                  )
               );
               echo '&lt;pre&gt;'. $ret_obj.'&lt;/pre&gt;';
  </code></pre>
  
  <p>Video I have uploaded is <a href="https://www.facebook.com/photo.php?v=774791969232150&amp;set=vb.100001040613852&amp;type=2&amp;theater&amp;notif_t=video_processed" rel="nofollow noreferrer">here</a></p>
  
  <p>Document I refer to code is here</p>
  
  <p><a href="https://developers.facebook.com/blog/post/493/" rel="nofollow noreferrer">https://developers.facebook.com/blog/post/493/</a></p>
  
  <p><a href="https://developers.facebook.com/blog/post/608/" rel="nofollow noreferrer">https://developers.facebook.com/blog/post/608/</a></p>
  
  <p>I have used following code as well, but I am getting that same error..</p>
  
  <pre><code>$id=$facebook-&gt;getUser(); /* UID of the connected user */
  
              $api="/".$id."/videos";
              echo "api -&gt; $api";
               /*$ret_obj = $facebook-&gt;api('/me/videos', 'POST', array(*/
                $ret_obj = $facebook-&gt;api($api, 'POST', array(
                  'source' =&gt; '@' . $video_file_path,
                  'title' =&gt; "This is just a test",
                  'description' =&gt; 'test9000',
                  'privacy' =&gt; json_encode(array('value' =&gt; 'EVERYONE' )),
                  )
               );
               echo '&lt;pre&gt;'. $ret_obj.'&lt;/pre&gt;';
  </code></pre>