Tag Facebook Friends Photos Upload

I would like to be able to tag existing friends using the api chart:

Here is the code that I have at the moment. The photo is loading, but the photo does not put the user specified in user_id:

        UIImage *testImage = [UIImage imageNamed:@"sendingTo"];
        NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:kFacebookFBConnectAppID, @"app_id",
                                       testImage, @"source",
                                       @"1381470076", @"message_tags",
                                       @"TEST!", @"message", nil];


        [self.socialIntegration.facebook requestWithGraphPath:[NSString stringWithFormat:@"/me/photos?access_token=%@", self.socialIntegration.facebook.accessToken]
                                                    andParams:params 
                                                andHttpMethod:@"POST" andDelegate:self];

Is an attribute message_tagsnot a valid attribute?

Thank!

EDIT From what I see here ( https://developers.facebook.com/docs/reference/api/photo/#tags ), it looks like I need to make three calls in total:

  • Post a photo with the code that I already have
  • Ask Facebook to give me the ID of this photo (which I can probably get from FBRequestDelegate)
  • Tag people after posting.
+5
1

ok, .

.

.

        UIImage *testImage = [UIImage imageNamed:@"sendingTo"];
        NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:kFacebookFBConnectAppID, @"app_id",
                                       testImage, @"source",
                                       @"TEST!", @"message", nil];


        [self.socialIntegration.facebook requestWithGraphPath:[NSString stringWithFormat:@"/me/photos?access_token=%@", self.socialIntegration.facebook.accessToken]
                                                    andParams:params 
                                                andHttpMethod:@"POST" andDelegate:self];

, , - (void)request:(FBRequest *)request didLoad:(id)result result 1 id. photoID , :

NSString *photoID = [NSString stringWithFormat:@"%@", [(NSDictionary*)result valueForKey:@"id"]];

GraphAPI, . , , , CSV:

[self.socialIntegration.facebook requestWithGraphPath:[NSString stringWithFormat:@"%@/tags/%@?access_token=%@", photoID, @"1381470076", self.socialIntegration.facebook.accessToken]
                                                    andParams:nil 
                                                andHttpMethod:@"POST" andDelegate:self];
+5

All Articles