C# Class SWorker.SocialWorker

SocialWorker
Inheritance: UnityEngine.MonoBehaviour
ファイルを表示 Open project: okamura0510/SocialWorker Class Usage Examples

Public Methods

Method Description
CreateChooser ( string message, string imagePath, Action onResult = null ) : void

アプリ選択式での投稿

OnSocialWorkerResult ( string res ) : void

結果コールバック。ネイティブプラグイン側から呼ばれるコールバック。

PostFacebook ( string imagePath, Action onResult = null ) : void

Facebook投稿。ただしFacebookは画像の投稿のみ許可しており、テキストの投稿は無視されることに注意。

PostInstagram ( string imagePath, Action onResult = null ) : void

Instagram投稿。Instagramは画像の投稿のみ行える。

PostLine ( string message, string imagePath, Action onResult = null ) : void

Line投稿。Lineはメッセージと画像の同時投稿は行えないことに注意。

PostMail ( string message, string imagePath, Action onResult = null ) : void

メール投稿

PostMail ( string to, string cc, string bcc, string subject, string message, string imagePath, Action onResult = null ) : void

メール投稿

PostTwitter ( string message, string imagePath, Action onResult = null ) : void

Twitter投稿

PostTwitter ( string message, string url, string imagePath, Action onResult = null ) : void

Twitter投稿

Private Methods

Method Description
Awake ( ) : void

初期化処理

createChooser ( string message, string imagePath ) : void
postInstagram ( string imagePath ) : void
postLine ( string message, string imagePath ) : void
postMail ( string to, string cc, string bcc, string subject, string message, string imagePath ) : void
postTwitterOrFacebook ( bool isTwitter, string message, string url, string imagePath ) : void

Method Details

CreateChooser() public static method

アプリ選択式での投稿
public static CreateChooser ( string message, string imagePath, Action onResult = null ) : void
message string メッセージ
imagePath string 画像パス(PNG/JPGのみ)。空文字の場合は処理されない。
onResult Action 結果コールバック
return void

OnSocialWorkerResult() public method

結果コールバック。ネイティブプラグイン側から呼ばれるコールバック。
public OnSocialWorkerResult ( string res ) : void
res string 結果値
return void

PostFacebook() public static method

Facebook投稿。ただしFacebookは画像の投稿のみ許可しており、テキストの投稿は無視されることに注意。
public static PostFacebook ( string imagePath, Action onResult = null ) : void
imagePath string 画像パス(PNG/JPGのみ)。空文字の場合は処理されない。
onResult Action 結果コールバック
return void

PostInstagram() public static method

Instagram投稿。Instagramは画像の投稿のみ行える。
public static PostInstagram ( string imagePath, Action onResult = null ) : void
imagePath string 画像パス(PNG/JPGのみ)
onResult Action 結果コールバック
return void

PostLine() public static method

Line投稿。Lineはメッセージと画像の同時投稿は行えないことに注意。
public static PostLine ( string message, string imagePath, Action onResult = null ) : void
message string メッセージ
imagePath string 画像パス(PNG/JPGのみ)。空文字の場合は処理されない。
onResult Action 結果コールバック
return void

PostMail() public static method

メール投稿
public static PostMail ( string message, string imagePath, Action onResult = null ) : void
message string メッセージ
imagePath string 画像パス(PNG/JPGのみ)。空文字の場合は処理されない。
onResult Action 結果コールバック
return void

PostMail() public static method

メール投稿
public static PostMail ( string to, string cc, string bcc, string subject, string message, string imagePath, Action onResult = null ) : void
to string 宛先。カンマ区切りの配列。
cc string CC。カンマ区切りの配列。
bcc string BCC。カンマ区切りの配列。
subject string タイトル
message string メッセージ
imagePath string 画像パス(PNG/JPGのみ)。空文字の場合は処理されない。
onResult Action 結果コールバック
return void

PostTwitter() public static method

Twitter投稿
public static PostTwitter ( string message, string imagePath, Action onResult = null ) : void
message string メッセージ
imagePath string 画像パス(PNG/JPGのみ)。空文字の場合は処理されない。
onResult Action 結果コールバック
return void

PostTwitter() public static method

Twitter投稿
public static PostTwitter ( string message, string url, string imagePath, Action onResult = null ) : void
message string メッセージ
url string URL。空文字の場合は処理されない。
imagePath string 画像パス(PNG/JPGのみ)。空文字の場合は処理されない。
onResult Action 結果コールバック
return void