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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:49:59+00:00 2026-05-23T00:49:59+00:00

I try to tag multiple friends on the phot using the Graph API AS3

  • 0

I try to tag multiple friends on the phot using the Graph API AS3 for my Flash application. If I’m using a value statically the result is success and works like a charm But when I try to feed the params.tags with a dynamic value I get from the array (populated from checkbox) it fails.

Here’s the dynamic and failed ones:

var arrUserID:Array = new Array("1447615481","1052646429");

var len:Number = arrUserID.length;
var someStr:String = "";
for (var i:Number=0;i<len;i++) {
    someStr += arrUserID[i]+","+Math.round(Math.random()*imgHolder.width)+","+Math.round(Math.random()*imgHolder.height);
    if(i != len-1){
        someStr += "||";
    }
}

var arr:Array = [];
arr = someStr.split("||");

var outputArr:Array = [];

var len2:Number = arr.length;

var temp:Array = [];

for (var j:Number=0;j<len2;j++) {
    temp = arr[j].toString().split(",");
    outputArr.push({'tag_uid':temp[0], 'x':temp[1], 'y':temp[2]});
}

var params:Object = new Object();
params.image = bitmap;
params.message = "YEZAAA";
params.fileName = "file-name";
**params.tags = JSON.encode(outputArr);** --> dynamic value from array

Facebook.api('me/photos', onSaveToPhotoAlbumComplete, params);

and here are the success version and the statical ones:

var params:Object = new Object();
params.image = bitmap;
params.message = "YEZAAA";
params.fileName = "file-name";
params.tags = '[{tag_uid:"12345678","x":"0","y":"0"},{tag_uid:"001 111","x":"0","y":"0"}]';

Facebook.api('me/photos', onSaveToPhotoAlbumComplete, params);

So it just keep me wondering, what is my wrong actually?

There is really a need here since I’ve been pulling my hair after a week try to figure out, but to no avail.

  • 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-23T00:50:00+00:00Added an answer on May 23, 2026 at 12:50 am

    Here’s how I got my dynamic id’s to work with your code:

    1) You have to remember that, like your static code, the tags parameter needs to ultimately result in a String. Your dynamic version is using an actual Object. So keep it a String like so:

    var tagsArr:String = '[{tag_uid:"' + uid1 + '", "x":"0", "y":"0"},
                           {tag_uid:"' + uid2 + '", "x":"0", "y":"0"}]';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the Java matcher to try and match the following: @tag TYPE_WITH_POSSIBLE_SUBTYPE -PARNAME1=PARVALUE1
I have annotated a String field with @NotEmpty tag. When I try to persist
I have this error when I try to include the tag ( http://code.google.com/p/struts2-jquery/wiki/HeadTag )
<tag> Алекс М </tag> When I try to get the content of the following
I have a span tag in html and this <span> can appear multiple times
I am trying to do multiple image uploads via the <cffileupload> tag. The tag
Basically, what I try to do is to add multiple confirmationalerts...but I just cant
I have a problem using multiple (2) jQuery plugins. I've googled a little but
Here is the problem. I have multiple tag forms in my page. They are
Try loading this normal .jpg file in Internet Explorer 6.0. I get an error

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.