Skip to content

quick reply example

찰스 edited this page Jul 24, 2023 · 3 revisions
  • example
{
  "type": "postback",
  "label": "Buy",
  "data": "action=buy&itemid=111",
  "displayText": "Buy",
  "inputOption": "openKeyboard",
  "fillInText": "---\nName: \nPhone: \nBirthday: \n---"
}
  • implement
IAction action = new PostBackAction()
{
  Label = "buy",
  Data = "action=buy&itemid=111",
  DisplayText = "Buy",
  InputOption = InputOptions.OpenKeyboard,
  FillInText = "---\nName: \nPhone: \nBirthday: \n---"
};
  • example
{
  "type": "message",
  "label": "Yes",
  "text": "Yes"
}
  • implement
IAction action = new MessageAction()
{
    Label = "Yes",
    Text = "Yes"
};
  • example
// Example of opening a specified URL in LINE's in-app browser
{
    "type": "uri",
    "label": "Menu",
    "uri": "https://example.com/menu"
}

// Example of opening different URLs for smartphone and desktop versions of LINE
{
   "type":"uri",
   "label":"View details",
   "uri":"http://example.com/page/222",
   "altUri": {
      "desktop" : "http://example.com/pc/page/222"
   }
}

// Example of opening a call app by specifying a phone number
{
    "type": "uri",
    "label": "Phone order",
    "uri": "tel:09001234567"
}

// Example of sharing LINE Official Account through LINE URL scheme
{
    "type": "uri",
    "label": "Recommend to friends",
    "uri": "https://line.me/R/nv/recommendOA/%40linedevelopers"
}
  • implement
// Example of opening a specified URL in LINE's in-app browser
IAction action1 = new UriAction()
{
    Label = "Menu",
    Uri = "https://example.com/menu"
};

// Example of opening different URLs for smartphone and desktop versions of LINE
IAction action2 = new UriAction()
{
    Label = "View details",
    Uri = "http://example.com/page/222",
    AltUri = new AlternativeUrl()
    { 
        Desktop = "http://example.com/pc/page/222"
    }
};

// Example of opening a call app by specifying a phone number
IAction action3 = new UriAction()
{
    Label = "Phone order",
    Uri = "tel:09001234567"
};

// Example of sharing LINE Official Account through LINE URL scheme
IAction action4 = new UriAction()
{
    Label = "Recommend to friends",
    Uri = "https://line.me/R/nv/recommendOA/%40linedevelopers"
};
  • example
{
  "type": "datetimepicker",
  "label": "Select date",
  "data": "storeId=12345",
  "mode": "datetime",
  "initial": "2017-12-25t00:00",
  "max": "2018-01-24t23:59",
  "min": "2017-12-25t00:00"
}
  • implement
IAction action = new DateTimePickerAction()
{
    Label = "Select date",
    Data = "storeId=12345",
    Mode = ActionModeType.Datetime,
    Initial = "2017-12-25t00:00",
    Max = "2018-01-24t23:59",
    Min = "2017-12-25t00:00"
};
  • example
{
  "type": "camera",
  "label": "Camera"
}
  • implement
IAction action = new CameraAction()
{
    Label = "Camera"
};
  • example
{
  "type": "cameraRoll",
  "label": "Camera roll"
}
  • implement
IAction action = new CameraRollAction()
{
    Label = "Camera roll"
};
  • example
{
  "type": "location",
  "label": "Location"
}
  • implement
IAction action = new LocationAction()
{
    Label = "Location"
};
  • example
{
  "type": "richmenuswitch",
  "richMenuAliasId": "richmenu-alias-b",
  "data": "richmenu-changed-to-b"
}
  • implement
IAction action = new RichMenuSwitchAction()
{
    RichMenuAliasId = "richmenu-alias-b",
    Data = "richmenu-changed-to-b"
};
Clone this wiki locally