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

  • SEARCH
  • Home
  • 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 6618807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:53:04+00:00 2026-05-25T20:53:04+00:00

I have a facebook canvas application and I want to upload a file from

  • 0

I have a facebook canvas application and I want to upload a file from my server to the user’s wall.

Facebook says that a form should be created, this is what I did:

 <form action="https://graph.facebook.com/me/photos?access_token=<%= @access_token %>" method="post" enctype="multipart/form-data">
        <input name="source" type="hidden" value="https://young-water-9853.herokuapp.com/images/1.jpg" />
        <input name="commit" type="submit" value="Upload photo" class="cupid-green" />
 </form>

This is the error I received:

{
“error”: {
“message”: “(#324) Requires upload file”,
“type”: “OAuthException”
}
}

How can I make it work?

Solution:

This is the action I am using to post an image to the wall:

get '/post_photo' do 
  RestClient.post 'https://graph.facebook.com/me/photos', :source => open('http://i52.tinypic.com/313jaxd.jpg'), :access_token => ACCESS_TOKEN
  redirect '/'
end
  • 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-25T20:53:04+00:00Added an answer on May 25, 2026 at 8:53 pm

    The source parameter needs to be a file object, not a url. If the user was uploading a file from their machine:

     <form action="https://graph.facebook.com/me/photos?access_token=<%= @access_token %>" method="post" enctype="multipart/form-data">
            <input name="source" type="file" />
            <input name="commit" type="submit" value="Upload photo" class="cupid-green" />
     </form>
    

    Or if you wanted the user to upload a predefined image, you’d take care of that server-side. The rest_client gem looks like an ideal solution for this:

    require 'rest_client'
    RestClient.post 'https://graph.facebook.com/me/photos', :source => File.new('/path/to/your/file'), :access_token => YOUR_ACCESS_TOKEN
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a canvas Facebook application, I have all user friends in JS array,
I'm building a Facebook Canvas IFrame application. The application should always have the session_key
The problem: I want to provide a facebook application as canvas page to user
I want to add real-time update wall in my facebook canvas application. The posts
I have a facebook canvas application that runs in an iframe. I would like
I have a Facebook canvas iframe application that uses the JavaScript SDK. How do
I have an app on http://apps.facebook.com/myappname that is a canvas page of http://mydomain.com .
We currently have an iframe-based Facebook canvas application in the works. The canvas portion
I have iframe based facebook app, I just want to do is that whenever
I have a facebook application and i use fancybox. I want to close fancybox

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.