0

I'm developing an iPhone app and I'd like to be able to include a message with the Facebook Request GraphAPI call that includes some of my friends. Normally when commenting in FB I would type "@name1", "@name2" and their FB profile would come up and they would get a notification that I tagged them in a comment.

Is there a way to format the "message" parameter in the ios SDK such that user's names appear and they're tagged in the message?

FishStix
  • 4,994
  • 9
  • 38
  • 53
  • please follow this link http://stackoverflow.com/questions/5906052/posting-on-friends-facebook-wall-using-iphone-application/6532095#6532095 – Amit Jan 05 '12 at 11:12

1 Answers1

0

You should specify the user ids of the friends mentioned in the post by using the to field as suggested here: https://developers.facebook.com/docs/reference/api/post/ but you should just pass in a comma separated list of id when posting. When getting you get back an array of objects.

DMCS
  • 31,720
  • 14
  • 71
  • 104
  • I tried adding a key/value pair of @"fbuid#", "to" as well as [NSArray arrayWithObject:@"fbuid#"], "to" and neither method tagged the fb user in the post. – FishStix Jan 07 '12 at 01:18
  • Works for me when I did it in the Graph API Explorer. Can you test it there to see if it works for you? – DMCS Jan 07 '12 at 03:33
  • Hey, can you provide the exact json, or the exact set of key/value pairs you used in Graph API Explorer? I tried all last night using the "to", "message_tags", and "tags" (on an image API call), and nothing was working. – FishStix Jan 10 '12 at 17:24
  • The `to` is a comma separated list of ID parameters – DMCS Jan 10 '12 at 17:36
  • tried that too... maybe just a concrete example would clarify what possibly small thing I'm doing wrong – FishStix Jan 11 '12 at 01:52
  • 1. Go to https://developers.facebook.com/tools/explorer 2. change URL to /me/feed 3. Change Get to Post. 4. Click "add a field" 5. for name enter "message" and for value "this is a great example". 6. click "add a field". 7. for name enter "to" and for value enter "{friendId1}, {friendId2}, {friendId3}" replacing friendIds with actual friend IDs that can be found on the me's friend list. 8. Click [Submit] 9. View posting on friends' walls. – DMCS Jan 11 '12 at 03:42
  • yea, I don't get this... I've tried values for "to" as "1234,12345", "{1234},{12345}" etc.... and the posts only appear on my wall with no link to anyone else, and they don't show up on other ppl's walls.... – FishStix Jan 13 '12 at 08:45
  • Have a friend try it. Both times I did it, it worked as expected. You don't need the {}, just the IDs. – DMCS Jan 13 '12 at 14:52
  • Just had a friend try it with the "to" just being my fbuid, and it didn't include me in the post. Maybe I'm missing a permission? – FishStix Jan 13 '12 at 17:36
  • Dude :slamming my head on a brick wall: You need to have your friend try with their own fbuid, app id, and access token. We know yours doesn't want to work for some reason and you need to troubleshoot why that is. – DMCS Jan 13 '12 at 17:56
  • haven't looked at this in over month... other priorities.. and no.. never got this working – FishStix Feb 14 '12 at 01:40