简体   繁体   中英

How to share a message in google Plus on multiple friends wall in iOS?

I'm trying to share a url with message on mutiple friends wall, in the current method I can choose friends while sharing, I was wondering if there is any way to predefine the friendlist to which the share should be posted. This is my current implementation as per google doc

- (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);
}

Any suggestions?

If you are using the Google+ Sign-In, you can include people in the share list using something like

  [shareBuilder setPreselectedPeopleIDs:@[@"106189723444098348646",@"109813896768294978296"]];

before the line

  [shareBuilder open];

More details at https://developers.google.com/+/mobile/ios/share/prefill#prefill_the_recipients_of_a_post

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM