You cannot compose message but you can send a link, photo or video via messenger.
Facebook provides API for that.
Import FBSDKShareKit
#import <FBSDKShareKit.h>
Create content and share
FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
content.contentURL = [NSURL URLWithString:@"http://www.url.com"];
content.contentTitle = @"My link!";
content.contentDescription = @"Check out my link!";
[FBSDKMessageDialog showWithContent:content delegate:self];
You also need to conform your controller to the FBSDKSharingDelegate
#pragma mark - FBSDKSharingDelegate
- (void)sharer:(id<FBSDKSharing>)sharer didCompleteWithResults:(NSDictionary *)results {
}
- (void)sharer:(id<FBSDKSharing>)sharer didFailWithError:(NSError *)error {
}
- (void)sharerDidCancel:(id<FBSDKSharing>)sharer {
}
Available contents are:
- FBSDKShareLinkContent
- FBSDKSharePhotoContent
- FBSDKShareVideoContent