I'm sending an image to Facebook from my iPhone app using the Graph API and ASIFormDataRequest. I want to set tags on the image.
Facebook docs say:
Quote:
|
tags: An array containing the users and their positions in this photo. The x and y coordinates are percentages from the left and top edges of the photo, respectively.
|
Photo - Facebook Developers
If I get info from Facebook on a previously tagged image, the tags look like this:
Code:
{
from = "some name";
height = 12345;
...
tags = {
data = (
{
"created_time" = "some time";
id = 12345;
name = "some name";
x = "41.875";
y = "35.4005";
}
);
};
}
This is the rest of the request set-up code:
Code:
NSURL *url = [NSURL URLWithString:@"https://graph.facebook.com/me/photos"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request addData:UIImagePNGRepresentation(image) forKey:@"data"];
[request setPostValue:msg forKey:@"message"];
[request setPostValue:accessToken forKey:@"access_token"];
Where msg and accessToken are strings.
What should I be passing forKey:@"tags"? An array of a dicts? A dict of arrays of dicts? Some kind of comma separated string?
[request setPostValue:tags forKey:@"tags"];
where tags == ???
Thanks!