The SocialShareComposer class provides an interface to compose a post for supported social networking services.
More...
|
| void | SetText (string value) |
| | Adds the initial text to be posted.
|
| |
|
void | AddScreenshot () |
| | Creates a screenshot and adds it to the post.
|
| |
|
void | AddImage (Texture2D image, TextureEncodingFormat textureEncodingFormat=TextureEncodingFormat.JPG) |
| | Adds an image to the post.
|
| |
| void | AddImage (byte[] imageData) |
| | Adds an image to the post.
|
| |
| void | AddURL (URLString url) |
| | Adds a URL to the post.
|
| |
| void | SetCompletionCallback (EventCallback< SocialShareComposerResult > callback) |
| | Specify the action to execute after the share sheet is dismissed.
|
| |
|
void | Show () |
| | Shows the share sheet interface, anchored at screen position (0, 0).
|
| |
| void | Show (Vector2 screenPosition) |
| | Shows the share sheet interface, anchored to given position.
|
| |
The following code example shows how to create composer for Facebook
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour
{
public void Start()
{
newComposer.AddText("Example");
}
{
}
}
The SocialShareComposer class provides an interface to compose a post for supported social networking...
Definition SocialShareComposer.cs:41
void AddScreenshot()
Creates a screenshot and adds it to the post.
Definition SocialShareComposer.cs:155
void SetCompletionCallback(EventCallback< SocialShareComposerResult > callback)
Specify the action to execute after the share sheet is dismissed.
Definition SocialShareComposer.cs:235
static SocialShareComposer CreateInstance(SocialShareComposerType composerType)
Initializes a new instance of the SocialShareComposer class.
Definition SocialShareComposer.cs:56
void Show()
Shows the share sheet interface, anchored at screen position (0, 0).
Definition SocialShareComposer.cs:247
This class contains the result of the user action which caused SocialShareComposer interface to dismi...
Definition SocialShareComposerResult.cs:12
Namespace for essential kit features. You need to import this namespace along with VoxelBusters....
Definition AddressBook.cs:8
SocialShareComposerType
The enum specifies the sharing service you want to post to.
Definition SocialShareComposerType.cs:11
◆ CreateInstance()
- Parameters
-
| composerType | Composer type. |
◆ IsComposerAvailable()
- Parameters
-
| composerType | Composer type. |
◆ SetText()
| void SetText |
( |
string | value | ) |
|
- Parameters
-
| value | The text to add to the post. |
◆ AddImage()
| void AddImage |
( |
byte[] | imageData | ) |
|
- Parameters
-
| imageData | The image to add to the post. |
◆ AddURL()
◆ SetCompletionCallback()
- Parameters
-
| callback | The action to be called on completion. |
◆ Show()
| void Show |
( |
Vector2 | screenPosition | ) |
|
- Parameters
-
| screenPosition | The position (in the coordinate system of screen) at which to anchor the share sheet menu. This property is used in iOS platform only. |