Si vous n'avez pas activé la connexion avec Google+, vous devez d'abord implémenter le code Google Plus sign in.
Si vous avez déjà mis en œuvre puis regardez ce code pour le partage:
- (void)googlePlusShare
{
[GPPShare sharedInstance].delegate = self;
id<GPPShareBuilder> shareBuilder = [[GPPShare sharedInstance] shareDialog];
// This line will manually fill out the title, description, and thumbnail of the
// item you're sharing.
// thumbnailURL is url of image you want to display.
[shareBuilder setTitle:@"Title of your post"
description:@"Description of your post"
thumbnailURL:[NSURL URLWithString:@"https:www.example.com/image.png"]];
/* This line passes the deepLinkID to our application
if somebody opens the link on a supported mobile device */
[shareBuilder setContentDeepLinkID:@"share"];
// set the text of post. user can edit this before sharing.
[shareBuilder setPrefillText:@"Your post texts."];
[shareBuilder open];
}
Ce code utilise la méthode setTitle:description:thumbnailURL:
pour définir les détails.
Si vous avez une URL Web de votre application, vous pouvez utiliser la méthode ci-dessous au lieu de setTitle:description:thumbnailURL:
.
[shareBuilder setURLToShare:[NSURL URLWithString:@"https://www.example.com/restaurant/sf/1234567/"]];
Pour plus de détails sur le partage Google+ à regarder Google Plus Sharing.
EDIT: Je vous recommande de vérifier d'abord si votre implémentation sign in
fonctionne correctement.
Postez votre code qui ne fonctionne pas. – BrettJ