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.
Post text/message on friend's wall using FBShareDialogParams on ios 7 - objective c
-
22-07-2023 - |
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,
Solution
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."