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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:26:16+00:00 2026-06-15T22:26:16+00:00

I always get (#324) Requires upload file when I post an image to facebook,

  • 0

I always get “(#324) Requires upload file” when I post an image to facebook, there are many people asked the question with the same error, most of them are using php sdk, seems they solved the problem by set fileUpload to true ($facebook->setFileUploadSupport(true);), for example: http://endorkins.com/2010/12/28/facebook-graph-api-upload-photos-requires-upload-file/, Exception when uploading photo with Facebook Graph API

But I am using graph api directly in iOS, I can’t find where to set this flag, I tried to set it when create the album and when upload the image, but it didn’t work.

Facebook graph API reference (http://developers.facebook.com/docs/reference/api/album/) said can_upload must be true for an album to allow upload photos to the album, I checked the album that I tried to upload the image and it is true.

I also have permission of user_photos, friends_photos, publish_stream, publish_actions.

Below is my code to post the image, I have spent a lot of time on this but can’t fix it, plz help me! any help is appreciated.

NSURL *url = [NSURL URLWithString:@"https://graph.facebook.com/"];

AFHTTPClient *client = [[AFHTTPClient alloc] initWithBaseURL:url];

NSMutableDictionary *params = [NSMutableDictionary dictionary];

[params setObject:token forKey:@"access_token"];

[params setObject:@"the message" forKey:@"message"];

NSData *imgData = UIImageJPEGRepresentation(self.img, 1.0);

[params setObject:imgData forKey:@"source"];

NSMutableURLRequest *request = [client requestWithMethod:@"POST" path:[NSString stringWithFormat:@"%@/photos", albumId] parameters:params];

[request setValue:@"multipart/form-data" forHTTPHeaderField:@"Content-Type"];

//        [request setValue:[NSString stringWithFormat:@"%d", imgData.length]   forHTTPHeaderField:@"Content-Length"];

AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc]initWithRequest:request];

[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {

} failure:^(AFHTTPRequestOperation *operation, NSError *error) {

        NSLog(@"%@", error);

        NSLog(@"%@", operation.responseString);

}];

[operation start];
  • 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-15T22:26:17+00:00Added an answer on June 15, 2026 at 10:26 pm

    OK finally I solved this by using facebook SDK to post the image.

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

Sidebar

Related Questions

**In any javaProject in eclipse there we always get .classpath file...like <?xml version=1.0 encoding=UTF-8?>
How can I make to always get same url, so the image path won't
I always get this error when trying to compile my file with Boost::GIL PNG
I tried many things but I always get cannot convert string to membershipuser from
I always get the last onload function, but I need both, Is there any
I always get stuck on foreign keys so I have a question about where
I always get stuck with managing rotation on iOS application, there must be some
I always get the error too many Columns when i execute this query. SELECT
Compiling the following coe always get the same frustrating mistake. I'm trying to compare
I always get confused when I am about to use a bit map to

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.