# Using Share buttons

# About

You can easily create and add the Share button from LINE Social Plugins to the website of your choice. If you want to add this to iOS or Android native apps, we recommend that you use the "Share with" screen. For more information on how to add this screen, refer to the "Using LINE Features with the LINE URL Scheme" page.

There are two ways to create the Share button. You can either create a button using the default designs provided by LINE, or use your own design to create a custom icon.

# Using official LINE icons

Follow the steps below to create a Share button using the default designs provided by LINE. All you need to do is simply select a language, enter the URL of a webpage where you want to add the button, and select a design for the button.

# Using custom icons

Follow the steps below to create a Share button using your custom icon. You can simply copy the link below and apply it to your button.

Tip

Example (URL: https://line.me/en)

https://social-plugins.line.me/lineit/share?url=https%3A%2F%2Fline.me%2Fen

Once the DOM tree is constructed and content is produced on your site, call LineIt.loadButton() to enable the Share button.

<script type="text/javascript">LineIt.loadButton();</script>


For custom icons, you can check the number of shares by following the steps below.

# HTTP request

GET https://api.line.me/social-plugin/metrics?url=https://line.me/en

# Request parameters

url

String

Required

The URL to get the share count for.
(For example: https://line.me/en)

# Sample request

curl -X GET 'https://api.line.me/social-plugin/metrics?url=https://line.me/en'

# Sample response

{
    "share": "4173",
}

# Status codes

200

OK

The request succeeded.

400

Bad request

The request contains invalid parameters or values.

500

Internal Server Error

An internal server error occurred.

# Need more help?