title: Facebook video upload Exception "(OAuthException - #1) An unknown error has occurred."
body: <p>My WPF application i am using <a href="http://www.nuget.org/packages/facebook" rel="nofollow"><strong>facebook C# SDK</strong></a> to upload videos to facebook wall. From last two days, when i upload video through my application, SDK returns <strong>"(OAuthException - #1) An unknown error has occurred."</strong> exception, but my video file uploaded to my facebook wall. </p>
  
  <p>I tried the following way to resolve this problem,<br/>&nbsp;&nbsp;&nbsp;&nbsp;1) Created new appliction for new AppID and AppSecretID.<br/>&nbsp;&nbsp;&nbsp;&nbsp;2) Change authentication permissions <strong>(current permissions provided user_about_me,read_stream,publish_stream,user_photos)</strong><br/>&nbsp;&nbsp;&nbsp;&nbsp;3) Clear the existing application permission in my facebook account<br/>&nbsp;&nbsp;&nbsp;&nbsp;4) Creating new facebook application and upload a video file.<br/><br/>But nothing helps me. Here is the code i used to upload video,<br/></p>
  
  <pre><code>public Task&lt;bool&gt; FacebookPost(string message,Stream videoFileStream)
      {
          bool result = false;
            try
              {
                  if (!string.IsNullOrEmpty(_localSettings.FBAccessToken))
                  {
                      _fbClient.AccessToken = "ACCESS_TOKEN";
                      _fbClient.AppId = "APP_ID";
                      _fbClient.AppSecret = "APP_SECRET";
  
                      var media = new FacebookMediaStream { ContentType = "video/mp4", FileName = "TestVideo.mp4" }.SetValue(fbStream);
                      dynamic parameters = new ExpandoObject();
                      parameters.Title = "Sample Video";
                      parameters.description = message;
                      parameters.source = media;
                      var uploadResult = await _fbClient.PostTaskAsync("me/videos", parameters);
                      result = uploadResult != null;                       
                  }
              }
              catch (FacebookOAuthException ex)
              {
                  result = false;
              }
              return result;
      }
  </code></pre>
  
  <p>Any help it will would be appreciated. Thanks in advanced. </p>