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 4241476
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:18:45+00:00 2026-05-21T03:18:45+00:00

I want to upload video on facebook using ios-sdk I check discussion in question

  • 0

I want to upload video on facebook using ios-sdk

I check discussion in question iPhone Facebook Video Upload and try to implement it in my application

I try to your code but not succeed

  1. I download your code https://github.com/zoul/facebook-ios-sdk
  2. take the FBVideoUpload.h/m classes from your src add add into my project
  3. include "FBVideoUpload.h" in FBConnect.h

  4. then I code for upload video as follow

This is Code

FBVideoUpload *upload = [[FBVideoUpload alloc] init];
upload.accessToken = facebookObj.accessToken;
upload.apiKey = fbAppKey;
upload.appSecret = fbAppSecret;
NSString *filePath = @"/Users/pratgupta/Library/Application Support/iPhone Simulator/4.1/Media/DCIM/100APPLE/IMG_0010.M4V";
NSURL *fileURL = [NSURL fileURLWithPath:filePath];
NSData *data = [NSData dataWithContentsOfFile:filePath];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                               data, @"",
                                               @"test", @"title",
                                               @"upload testing", @"description",
                                               @"EVERYONE", @"privacy",
                                               nil];
[upload startUploadWithURL:fileURL params:params delegate:self];

But got the error in Logs i.e
Unable to retrieve session key from the access token.

which is due to

if ([self sessionID] == nil) {
        NSLog(@"Unable to retrieve session key from the access token);
        return;
}

in class FBVideoUpload

For Login I am using this code

fbPermissions =  [[NSArray arrayWithObjects:
                       @"read_stream", @"offline_access", @"publish_stream",nil] retain];
facebookObj = [[Facebook alloc] initWithAppId:fbAppId];
[facebookObj authorize:fbPermissions delegate:self];

I am able to fetch my updates from facebook so then session is ok here.
Can you please tell me What wrong I am doing?

EDIT
After changing the login steps suggested by the zoul I am now not getting the sessionID error log.. My request is now sending to the fb server but getting this response

<?xml version="1.0" encoding="UTF-8"?>
<error_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd">
  <error_code>100</error_code>
  <error_msg>privacy must contains a valid privacy 'value'</error_msg>
  <request_args list="true">
    <arg>
      <key>description</key>
      <value>upload testing</value>
    </arg>
    <arg>
      <key>privacy</key>
      <value>EVERYONE</value>
    </arg>
    <arg>
      <key>v</key>
      <value>1.0</value>
    </arg>
    <arg>
      <key>api_key</key>
      <value>[here is my API key]</value>
    </arg>
    <arg>
      <key>method</key>
      <value>facebook.video.upload</value>
    </arg>
    <arg>
      <key>session_key</key>
      <value>c4ada192feb82e8f239a283d-555042146</value>
    </arg>
    <arg>
      <key>sig</key>
      <value>8255d4cc3838b278b26fbfc8c86818a3</value>
    </arg>
    <arg>
      <key>title</key>
      <value>test</value>
    </arg>
  </request_args>
</error_response>

Amit Battan

  • 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-05-21T03:18:45+00:00Added an answer on May 21, 2026 at 3:18 am

    See the comments in FBVideoUpload.h:

    Please note that this code parses the
    access token from
    the Facebook class, which is quite brittle, unofficial and
    could easily break with the upcoming SDK releases. Also it
    seems to only work with the older, pop-up authentication and
    not the new one that uses app switching. (The new authentication
    scheme seems to result in a different auth token format
    that we can’t parse.)

    Your problem looks like you are using the modern, app-switching authentication scheme. That results in a different access token and therefore the video uploading hack does not work. Switching to the older authentication scheme is easy, see code in this branch (it adds a forceOldStyleAuth property to the Facebook class).


    As for the dictionary to pass with the upload, here’s how my code looks:

    NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
        @"Sample video title", @"title",
        @"Sample video description", @"description",
        nil];
    upload = [[FBVideoUpload alloc] init];
    [upload setApiKey:kAPIKey];
    [upload setAccessToken:facebook.accessToken];
    [upload setAppSecret:kAppSecret];
    [upload startUploadWithURL:movieURL params:params delegate:self];
    

    This works for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to upload video on Facebook . for this I am using my
I want to upload video (basically large files) without using Flash Plugin. It would
I want to upload and store video files to my server using PHP. Could
I want to upload a video from iPhone to a server somewhere. I have
I want to upload video using uploadify newest version, but I failed. My code:
I want to upload video from my app to the youtube. I am using
I want to upload video to Youtube from my ASP.NET application. It should return
I want to retrieve the video upload limit in facebook and i want to
I want to upload a video to youtube from my installable android application. Is
I am using fileuploader.js to upload a video file. Now i want to convert

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.