Facebook send dialog in iOS app -


i have ios app in tell user share link friends wants. want offer him possibility open new inbox within app , if possible pre-filled content. no pre-filled recipient. , want available users (not facebook connect).

basically want replicate following send dialog web in app: https://developers.facebook.com/docs/reference/dialogs/send/

which means open facebook app , not browser show new inbox dialog.

from research found no clear solution , possible website surprised cannot same app.

thank in advance, jules

you can use uiactivityviewcontroller.
first have create list of things want share: url, string, etc this

nsarray *activityitems = @[[nsurl urlwithstring:@"www.link-to-share.com], @"what want written above"]; 

afterwards, have create uiactivityviewcontroller things want share , present modally:

uiactivityviewcontroller *activitycontroller = [[uiactivityviewcontroller alloc] initwithactivityitems:activityitems applicationactivities:nil]; [self presentviewcontroller:activitycontroller animated:yes completion:nil]; 

you can add completion block notified when user done sharing:

[activitycontroller setcompletionhandler:^(nsstring *activitytype, bool completed){     //do stuff }]; 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -