FBDialogs on iOS

1.8k views Asked by At

What I'd like to do

Post text to a friend's feed from my app.

or

Post text to my own feed with a tagged friend.

What I've tried

[FBDialogs presentOSIntegratedShareDialogModallyFrom:self
                                         initialText:@"Some text!"
                                              images:nil
                                                urls:nil
                                             handler:nil];

This doesn't work as you can't tag any friends in it neither in the text nor as a "with" tag.

FBShareDialogParams *params = [[FBShareDialogParams alloc] init];
params.caption = @"Some text";
params.friends = selectedFriends;
params.description = @"Some text";
params.name = @"Some text";

[FBDialogs presentShareDialogWithParams:params
                            clientState:nil
                                handler:nil];

This doesn't work as the fields caption, description and name are only used if a link is specified. But I don't want to specify a link.

Is there any way to ideally post to a friend's "wall"/feed. Or to at least post some text with a tagged friend?

EDIT

OK, by using the second method I can at least tag friends. Is there any way to set the initial text on the second method?

1

There are 1 answers

0
StuartM On

There is some useful information here: https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/publish-open-graph-story/

You should look into using [FBRequestConnection startForPostWithGraphPath: