Google+ Platform for iOS

GPPShareBuilder Protocol Reference

GPPShareBuilder Protocol Reference

Overview

The builder protocol to open the share dialog.

For more information on sharing, see http://developers.google.com/+/mobile/ios/share .

Inheritance diagram for GPPShareBuilder:
GPPNativeShareBuilder

Public Member Functions

(id< GPPShareBuilder >) - setURLToShare:
 Sets the URL resource to be shared.
(id< GPPShareBuilder >) - setPrefillText:
 Sets the text to prefill user's comment in the share dialog.
(id< GPPShareBuilder >) - setTitle:description:thumbnailURL:
 Sets the title, description, and thumbnail URL of the shared content preview in the share dialog.
(id< GPPShareBuilder >) - setContentDeepLinkID:
 Sets the content deep-link ID that takes the user straight to your shared content.
(id< GPPShareBuilder >) - setCallToActionButtonWithLabel:URL:deepLinkID:
 Sets the call-to-action button of the shared content preview.
(BOOL) - open
 Opens the share dialog. Returns NO if there was an error, YES otherwise.

Member Function Documentation

- (id<GPPShareBuilder>) setURLToShare: (NSURL *)  urlToShare

Sets the URL resource to be shared.

- (id<GPPShareBuilder>) setPrefillText: (NSString *)  prefillText

Sets the text to prefill user's comment in the share dialog.

- (id<GPPShareBuilder>) setTitle: (NSString *)  title
description: (NSString *)  description
thumbnailURL: (NSURL *)  thumbnailURL 

Sets the title, description, and thumbnail URL of the shared content preview in the share dialog.

Only set these fields if you are sharing with a content deep link and don't have a URL resource. title is required.

- (id<GPPShareBuilder>) setContentDeepLinkID: (NSString *)  contentDeepLinkID

Sets the content deep-link ID that takes the user straight to your shared content.

Only set this field if you want the content deep-linking feature. The content deep-link ID can either be a fully qualified URI, or URI path, which can be up to 512 characters in length.

- (id<GPPShareBuilder>) setCallToActionButtonWithLabel: (NSString *)  label
URL: (NSURL *)  url
deepLinkID: (NSString *)  deepLinkID 

Sets the call-to-action button of the shared content preview.

The call-to-action button consists of a label, URL, and deep-link ID. The label is a string key defined under "data-calltoactionlabel" on http://developers.google.com/+/web/share/interactive#button_attr_calltoactionlabel that maps to the actual button text. The url is where the user is taken to after tapping on the button. The optional deepLinkID is the call-to-action deep-link ID that takes the user straight to a specific action in your app. It can either be a fully qualified URI, or URI path, which can be up to 512 characters in length. Note: In order to set the call-to-action button: 1. User must have been authenticated with scopes including "https://www.googleapis.com/auth/plus.login". 2. setURLToShare: must also be called.

- (BOOL) open

Opens the share dialog. Returns NO if there was an error, YES otherwise.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.