Fabio B.
Fabio B.

Reputation: 9400

error_msg=Invalid photo tag subject, error_code=322

Using fbconnect on iPhone.

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               pid, @"pid",
                               FACEBOOK_PAGE_ID, @"tag_uid",
                               @"50.0", @"x",
                               @"50.0", @"y",
                               nil];

[self.theFacebook requestWithMethodName:@"photos.addTag"
                              andParams:params
                          andHttpMethod:@"POST"
                            andDelegate:self];

Is my FACEBOOK_PAGE_ID really wrong? In that case, how can I find the right one?

Upvotes: 0

Views: 1200

Answers (3)

David Mahon
David Mahon

Reputation: 46

Many Facebook pages are not valid tagging subjects. At this time, only pages with the primary category Person or Brand can be tagged. Specifically, Local Business cannot be tagged. Unfortunately, only the subcategory is revealed in the API and there is overlap; some subcategories are in both Local Business and Brand.

The produces strange results for ambiguous combinations like regional chains, which aren't truly a brand, but aren't truly a geo-taggable local business either.

Upvotes: 0

melli-182
melli-182

Reputation: 1234

look at facebook developers page, the seccion photos/tag:

"Currently, you cannot tag a Page in a photo using this API"

The link

Upvotes: 1

Jeshua Lacock
Jeshua Lacock

Reputation: 6668

This is working for me:

- (void)tagPhotoWithPhotID:(NSString *)photoID {

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               photoID, @"pid",
                               @"Test Tag", @"tag_text",
                               @"50.0", @"x",
                               @"50.0", @"y",
                               nil];

[self.facebook requestWithMethodName:@"photos.addTag"
                              andParams:params
                          andHttpMethod:@"POST"
                            andDelegate:self];
}

Instead of "tag_text" key you may use "tag_uid" and supply a valid user ID as a NSString.

Upvotes: 0

Related Questions