I have poured over the FQL APIs, done google searches - but can't figure out how to get the list of people tagged in a note. It isn't on the 'note' table. And there is no note_tags table.
Anyone else worked this out?
I have poured over the FQL APIs, done google searches - but can't figure out how to get the list of people tagged in a note. It isn't on the 'note' table. And there is no note_tags table.
Anyone else worked this out?
this is sort of a work-around if you're not shy of taking up some processing power and you are trying to find the user's friends who are tagged you can query their streams:
NSString* fql = [NSString stringWithFormat:
@"SELECT source_id, attachment FROM stream WHERE source_id IN (SELECT uid2 FROM friend WHERE uid1 =%@ limit %d", yourUserID, limitInt];
NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"];
[[FBRequest requestWithDelegate:self] call:@"facebook.fql.query" params:params];
and then search through the "name" attribute of the attachments for the title of the post, or the href attribute for the hyperlink to the note.
if you want their names you can do a multiquery:
NSString* fql = [NSString stringWithFormat:@"\"friendStreams\":\"SELECT source_id, attachment FROM stream WHERE source_id IN (SELECT uid2 FROM friend WHERE uid1 =%@ limit %d\",\"userNames\":\"SELECT name, uid FROM user WHERE uid IN (SELECT source_id FROM #friendStreams)\"", yourUserID, limitInt];
NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"queries"];
//NSLog(@"creating request delegate");
[[FBRequest requestWithDelegate:self] call:@"facebook.fql.multiquery" params:params];
unfortunately there is, as far as I know, no way to search through the attachments in the query.
Of course this method would also bring up friends who have shared the note on their wall... you could possibly work around that by restricting the created_time attribute. I'm not sure of this but it appears that if you're tagged at the note's creation the story shows up on your wall slightly before the actual note is posted on the creator's wall: for a test note I did the note was posted to the creator's wall at 1279919730 and the story about the note on the tagged person's wall was created at 1279919725. Maybe that helps.