根据Google+ iOS SDK docs,您可以通过以下方式分享到Google+:
- (IBAction) didTapShare: (id)sender {
id<GPPShareBuilder> shareBuilder = [[GPPShare sharedInstance] shareDialog];
// This line will manually fill out the title, description, and thumbnail of the
// item you're sharing.
[shareBuilder setTitle:@"New 5k record!"
description:@"I just ran 5000 meters in 26:16! That's a new record!";
thumbnailURL:@"https://www.example.com/images/5krun.png"];
[shareBuilder open];
}
然而,description
“我只是在26:16跑了5000米!这是一个新纪录!”共享后不会显示在您的个人资料页面上,只有title
和thumbnailURL
会这样做。这些描述存在于将要共享的内容的预览中,但是当您分享它时,它不存在。
此外,文档并未说明这一点,但您必须致电
[shareBuilder setContentDeepLinkID:@"some id here"];
否则SDK将其打印出来:
-[GPPShareBuilderImpl getURL] Content deep-link ID is required with title and description.
文档没有提到这一点的事实让我觉得它已经过时了,我需要做一些其他事情来分享描述。有人得到了描述吗?