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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:08:40+00:00 2026-05-26T16:08:40+00:00

After I upload a photo on a desktop facebook application i need to store

  • 0

After I upload a photo on a desktop facebook application i need to store it’s post id in a database. From the facebook ActionScript SDK documentation:

api() method

public static function api(method:String, callback:Function, params:* = null, requestMethod:String = GET):void

Makes a new request on the Facebook Graph API.

Parameters […]

callback:Function — Method that will be called when this request is complete The handler must have the signature of callback(result:Object, fail:Object); On success, result will be the object data returned from Facebook. On fail, result will be null and fail will contain information about the error.

So I implemented my callback function as follows:

    protected function handleUploadComplete(response:Object, fail:Object):void{

            status = (response) ? 'Success' : 'Error';
            var file:File = File.desktopDirectory.resolvePath("Log.txt");
            var stream:FileStream = new FileStream();
            stream.open(file, FileMode.WRITE);
            stream.writeUTFBytes(response.toString());
            stream.close();

        }

The problem is that response or response.toString() both return “[object Object]”, and I was hoping for something more like “id: somenumber”.
What am I doing wrong?

  • 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-26T16:08:41+00:00Added an answer on May 26, 2026 at 4:08 pm

    If everything has worked the response will contain a property called id that is your post ID. Otherwise it will be null and the fail object will be populated.

    protected function handleUploadComplete(response:Object, fail:Object):void
    {
        var status:Boolean = response != null;
        if(status) var id:String = response.id;
        //do whatever you want
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application where I need the user to upload a photo. After
I need to upload photo on Facebook. But it seems to be impossible. I
Looking for some code to upload a photo to facebook using the Graph API
I am using facebook.photos.upload to upload photos direct from my application into facebook albums.
After running my Cake application locally i tried to upload it to my remote
After I upload a photo to a server, I want to save it in
I have a large photo that I am trying to upload and after about
I am attempting to use the following code to upload a photo to Facebook
I'm trying to take a photo from my iPhone app and upload to a
I am working on facebook application. I am getting the offline access permission from

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.