我正试图在多个朋友墙上共享一个带有消息的url,在当前的方法中,我可以在共享时选择朋友,我想知道是否有任何方法可以预定义共享应该发布到的朋友列表。这是我目前根据谷歌文档的实现
- (IBAction) didTapShare: (id)sender
{
{
[GPPShare sharedInstance].delegate = self;
id<GPPShareBuilder> shareBuilder = [[GPPShare sharedInstance] shareDialog];
[shareBuilder setURLToShare:[NSURL URLWithString:@"http://dummy.com"]];
[shareBuilder setTitle:@"Some title" description:@"Some description" thumbnailURL:[NSURL URLWithString:@"http://dummy.com/image"]];
[shareBuilder setContentDeepLinkID:@"share"];
[shareBuilder open];
}
}
- (void)finishedSharing:(BOOL)shared
{
NSString *text = shared ? @"Success" : @"Canceled";
NSLog(@"%@",text);
}
有什么建议吗?
如果你使用Google+登录,你可以使用之类的东西将人包括在共享列表中
[shareBuilder setPreselectedPeopleIDs:@[@"106189723444098348646",@"109813896768294978296"]];
在线之前
[shareBuilder open];
更多详细信息,请访问https://developers.google.com/+/mobile/ios/share/prefill#prefill_the_recipients_of_a_post