简体   繁体   English

在iOS 7上使用FBShareDialogParams在朋友的墙上发布文本/消息-目标C

[英]Post text/message on friend's wall using FBShareDialogParams on ios 7 - objective c

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. 我可以使用FBShareDialogParams在Facebook朋友的墙上共享带有名称,标题和描述的链接,但是我不能使用此链接共享文本消息,甚至不能共享没有链接的文本。

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. 我正在使用IOS 7和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, 谢谢,

Prefilling the message is against Facebook Platform policies, which is why the SDK does not allow you to do it. 预填充消息违反了Facebook平台政策,这就是SDK不允许您这样做的原因。 The message MUST be user provided. 该消息必须由用户提供。

For more info, if any one need it.. 有关更多信息,如果有需要的话。

https://developers.facebook.com/policy/ 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." 从第IV.2节开始:“除非用户在工作流的前面手动生成了内容,否则不得预先填写与以下产品相关的任何字段:流故事(Facebook.streamPublish和FB.Connect.streamPublish的user_message参数,以及stream.publish的消息参数),照片(标题),视频(描述),便笺(标题和内容),链接(评论)和Jabber / XMPP。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM