Facebook is not shown in UIActivityViewController but twitter does

前端 未结 5 957
没有蜡笔的小新
没有蜡笔的小新 2020-12-15 07:18

My iOS is 8.1.2 and I am using the UIActivityViewController for social sharing. I click on a button and allow the UIActivityViewController to present

- (IBAc         


        
5条回答
  •  我在风中等你
    2020-12-15 07:22

    To show facebook sharing button you must add a image to the array of activity items... this may be a bug on apple side but i've not seen any open radar about this issue.

    Also note on iOS 8.3 text can't be added to facebook for some reason. when adding text you only be presented to a blank textfield.

    UIImage *image = [UIImage imageNamed:@"__some_image__file"];
    
    UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[image]
                                                                                         applicationActivities:nil];
    
    [self presentViewController:activityViewController animated:YES completion:nil];
    

提交回复
热议问题