Skip to main content

How to use shareMessage

Introduction​

The shareMessage function implemented in Mobage SDK, allows the user to recommend the game to a friend by selecting his/her favor social service.

warning

Notice that this API has been deprecated from Mobage SDK 1.4.7 .

info

The information and images below are from October 2013. Please notice that any content below can below could be changed in the future.

 Supported Services​

Currently shareMessage supports the following services

  • LINE

  • Twitter

  • Mail

    Implementation​

The following explains how you can implement shareMesasage for Native SDK.

OSimportFunction name
Androidcom.mobage.android.social.jp.ServiceshareMessage(message, title, pictureUrl, onComplete)
iOSMBGSocialJPService.h+ shareMessage:title:pictureUrl:onDismiss:

Android​

Service.shareMessage(
"Lets play Blood Brothers together !! http://sp.mbga.jp/_game_launch?game_id=12012945&cid=29",
"mobage",
"",
new OnShareMessageComplete() {
@Override
public void onDismiss() {
}
});

iOS​

[MBGSocialJPService
shareMessage:@"Lets play Blood Brothers together !! http://sp.mbga.jp/_game_launch?game_id=12012945&cid=29"
title:@"mobage"
pictureUrl:@""
onDismiss:^{

}];

The following explains how you can implement shareMesasage for Unity SDK.

Function nameMobageJPService.shareMessage(message, title, pictureUrl, onDialogComplete);
MobageJPService.shareMessage(
"Lets play Blood Brothers together !! http://sp.mbga.jp/_game_launch?game_id=12012945&cid=29",
"mobage",
"",
onDismiss);
public void onDismiss() {
}

Android Specifications​

Top screen for shareMessage function​

By selecting any of the services below, it will confirm the login status of Mobage browser version. The following login confirmation screen will show incase the user is not logged in.
 

LINE​

(If LINE is not installed)

  1. Confirmation screen will show
  2. Will move to Google Play store
     

     
    (If LINE is already installed)
  3. LINE application will initialize and move to post selection screen
  4. Once selected it will move to edit screen
  5. Post (The sample is when posted to Home)

The parameter on shareMessage function will be set as below.

ParameterCorresponded Value
titleLetters inside【】
messageLetters outside【】
pictureUrlNot Supported

Twitter​

  1. Confirmation screen will show
  2. Will access Twitter by browser

The parameter on shareMessage function will be set as below.

ParameterCorresponded Value
titleNot Supported
messageBody
pictureUrlNot Supported

Mail​

  1. Will launch default Mail application

The parameter on shareMessage function will be set as below.

ParameterCorresponded Value
titleSubject
messageBody
pictureUrlNot Supported

iOS Specificcations​

Top screen for shareMessage function​

By selecting any of the services below, it will confirm the login status of Mobage browser version. The following login confirmation screen will show incase the user is not logged in.

LINE​

(If LINE is not installed)

  1. Confirmation screen will show
  2. Will move to App Store

(If LINE is already installed)

  1. LINE application will initialize and move to post selection screen
  2. Once selected it will move to edit screen
  3. Post (The sample is when posted to Home)

ParameterCorresponded Value
titleLetters inside【】
messageLetters outside【】
pictureUrlNot Supported

Twitter​

  1. Confirmation screen will show
  2. Will access Twitter by browser

The parameter on shareMessage function will be set as below.

ParameterCorresponded Value
titleNot Supported
messageBody
pictureUrlNot Supported

Mail​

  1. Will launch default Mail application

The parameter on shareMessage function will be set as below.

ParameterCorresponded Value
titleSubject
messageBody
pictureUrlNot Supported

Revision History​

  • 2013/11/01
    • Initial Release
  • Introduction
  •  Supported Services
  • Implementation
    • Android
    • iOS
  • Android Specifications
    • Top screen for shareMessage function
    • LINE
    • Twitter
    • Mail
  • iOS Specificcations
    • Top screen for shareMessage function
    • LINE
    • Twitter
    • Mail
  • Revision History