如何在Facebook上共享内容时添加多个#标签

时间:2017-09-25 06:24:43

标签: ios objective-c facebook hashtag facebook-share

我在我的应用中使用Facebook分享。我想在我的共享内容中添加多个主题标签。我成功添加了一个hashtag,但我需要添加多个hashtags。这是我到目前为止使用的代码:

            FBSDKShareDialog *dialog = [[FBSDKShareDialog alloc] init];
            dialog.fromViewController = self;
            FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
            content.contentTitle = APP_NAME;
            content.contentDescription = text;

            if ([arrAllEvents count]>0) {

                content.imageURL = [NSURL URLWithString:[[arrAllEvents valueForKey:@"flyer_image"] objectAtIndex:index1]];
            }
            content.contentURL = url;

            NSString *strHashtag =[NSString stringWithFormat:@"%@ %@",@"#Book",@"#Crazy"];
            content.hashtag = [FBSDKHashtag hashtagWithString:@"#Crazy"];

            dialog.shareContent = content;
            dialog.mode = FBSDKShareDialogModeFeedWeb;
            [dialog show];

1 个答案:

答案 0 :(得分:0)

很遗憾,FB已更新了其policy。您只能拥有 1个标签