Francis F
Francis F

Reputation: 3285

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?

Upvotes: 0

Views: 1094

Answers (1)

Prisoner
Prisoner

Reputation: 50701

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

Upvotes: 1

Related Questions