Question

I can share link, with name, caption and description on Facebook friend's wall by using FBShareDialogParams, But I can't share text message with this link, or even only text without link.

For this i use below code:

FBShareDialogParams *sharedParams = [[FBShareDialogParams alloc] init];

sharedParams.friends = fpc.selection;
NSURL *candidateURL = [NSURL URLWithString:_contentDataToShare];
sharedParams.description = @"See this link ..";
sharedParams.link = candidateURL;

if ([FBDialogs canPresentShareDialogWithParams:sharedParams]) {
   [FBDialogs presentShareDialogWithParams:sharedParams clientState:nil
                                handler:^(FBAppCall *call, NSDictionary *results, NSError *error) {
                                    if(error)
                                    {
                                        NSLog(@"ERROR : %@",error);
                                    }
                                    else
                                    {
                                        NSLog(@"Posted AL7");
                                    }
                                }];

}

I'm working on IOS 7. and Facebook SDK 3.13.1. I can post link successfully, but i need to post text message too, how can i do that ? Event text only, or with link.

Thank you,

Was it helpful?

Solution

Prefilling the message is against Facebook Platform policies, which is why the SDK does not allow you to do it. The message MUST be user provided.

OTHER TIPS

For more info, if any one need it..

https://developers.facebook.com/policy/

From section IV.2 : "You must not pre-fill any of the fields associated with the following products, unless the user manually generated the content earlier in the workflow: Stream stories (user_message parameter for Facebook.streamPublish and FB.Connect.streamPublish, and message parameter for stream.publish), Photos (caption), Videos (description), Notes (title and content), Links (comment), and Jabber/XMPP."

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top