Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
538 views
in Technique[技术] by (71.8m points)

ios - plugin com.apple.share.Facebook.post invalidated

In my app I'm using the following code that allows to share an image with a text:

- (IBAction)sharePressed:(id)sender {
    UIImage *postingImage = [UIImage imageWithContentsOfFile:self.filepath];
    UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[@"Lorem ipsum", postingImage] applicationActivities:nil;
    [self presentViewController:activityViewController animated:YES completion:nil];
}

Posting the image to Facebook works fine and it appears on my FB wall, however in my console I get the following message:

plugin com.apple.share.Facebook.post invalidated

I've tested it on a couple of devices, as far as I could see it only happens on my iPhone 6 with iOS 8.1 installed.

Anyone knows what that message means and how to prevent it from showing?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Here is the correct answer ios plugin com.apple.share.Facebook.post do not show provided text. It's a bummer.

I'm afraid to tell you, you cannot post text to Facebook programatically. It's a new Facebook prohibition that forbids "pre-filled" Facebook sharing. That is why newer versions of iOS do not show your text, even tough it's correctly provided (and works on Twitter and in other sharing options).

For more info please refer to https://developers.facebook.com/docs/apps/review/prefill


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...