简体   繁体   中英

Tagging a friend to the wall post using graph API in iOS

I am using this code to post on my wall and at the same time I want to tag to my specefic friends but don't know how I am using Fbgrapgh API please help me.

[variables setObject:messageTextView.text forKey:@"message"]; [graphref doGraphPost:[NSString stringWithFormat:@"me/feed",self.friendID] withPostVars:variables]; Thanks

To tag someone you have to use FbDialogs. you cannot tag your friends in status update in any way other than FB dialogs.

to share status using FBDialog refer this sample code

[FBDialogs presentShareDialogWithLink:nil handler:^(FBAppCall *call, NSDictionary *results, NSError *error) {

    if(error) {

        NSLog(@"Error: %@", error.description);

  } else {

        NSLog(@"Success!");

    }

}];

it is taken from here https://developers.facebook.com/ios/share-dialog/#statusupdate

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM