GET /meta/sharing-buttons

Get a list of external services for which sharing buttons are supported.

Resource Information

   
Method GET
URL https://public-api.wordpress.com/rest/v1.1/meta/sharing-buttons
Requires authentication? No

Query Parameters

Response Parameters

Resource Errors

This endpoint does not return any errors.

Example

curl 'https://public-api.wordpress.com/rest/v1.1/meta/sharing-buttons'
<?php
$options  = array (
  'http' => 
  array (
    'ignore_errors' => true,
  ),
);

$context  = stream_context_create( $options );
$response = file_get_contents(
	'https://public-api.wordpress.com/rest/v1.1/meta/sharing-buttons',
	false,
	$context
);
$response = json_decode( $response );
?>

Response

{
    "services": {
        "email": {
            "ID": "email",
            "name": "Email",
            "class_name": "Share_Email",
            "icon": "\f410",
            "preview_smart": "<a rel=\"nofollow\" class=\"share-email sd-button\" href=\"http:\/\/en.blog.wordpress.com\/2014\/02\/10\/new-sharing-reblogging\/?share=email\" title=\"Click to email\"><span>Email<\/span><\/a>",
            "preview_smart_js": "\t<div id=\"sharing_email\" style=\"display: none;\">\n\t\t<form action=\"\/rest\/v1\/meta\/sharing-buttons\/?http_envelope=1&\" method=\"post\">\n\t\t\t<label for=\"target_email\">Send to Email Address<\/label>\n\t\t\t<input type=\"email\" name=\"target_email\" id=\"target_email\" value=\"\" \/>\n\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"source_name\" value=\"Joey Kudish\" \/>\n\t\t\t\t<input type=\"hidden\" name=\"source_email\" value=\"[email protected]\" \/>\n\t\t\t\n\t\t\t<div class=\"recaptcha\" id=\"sharing_recaptcha\"><\/div><input type=\"hidden\" name=\"recaptcha_public_key\" id=\"recaptcha_public_key\" value=\"6LcYW8MSAAAAADBAuEH9yaPcF7lWh11Iq62ZKtoo\" \/>\n\t\t\t<img style=\"float: right; display: none\" class=\"loading\" src=\"https:\/\/s2.wp.com\/wp-content\/mu-plugins\/post-flair\/sharing\/images\/loading.gif\" alt=\"loading\" width=\"16\" height=\"16\" \/>\n\t\t\t<input type=\"submit\" value=\"Send Email\" class=\"sharing_send\" \/>\n\t\t\t<a href=\"#cancel\" class=\"sharing_cancel\">Cancel<\/a>\n\n\t\t\t<div class=\"errors errors-1\" style=\"display: none;\">\n\t\t\t\tPost was not sent - check your email addresses!\t\t\t<\/div>\n\n\t\t\t<div class=\"errors errors-2\" style=\"display: none;\">\n\t\t\t\tEmail check failed, please try again\t\t\t<\/div>\n\n\t\t\t<div class=\"errors errors-3\" style=\"display: none;\">\n\t\t\t\tSorry, your blog cannot share posts by email.\t\t\t<\/div>\n\t\t<\/form>\n\t<\/div>\n"
        },
        "print": {
            "ID": "print",
            "name": "Print",
            "shortname": "print",
            "icon": "\f469",
            "preview_smart": "<a rel=\"nofollow\" class=\"share-print sd-button\" href=\"http:\/\/en.blog.wordpress.com\/2014\/02\/10\/new-sharing-reblogging\/\" title=\"Click to print\"><span>Print<\/span><\/a>",
            "preview_smart_js": ""
        },
        "facebook": {
            "ID": "facebook",
            "name": "Facebook",
            "shortname": "facebook",
            "icon": "\f204",
            "preview_smart": "<div class=\"fb-share-button\" data-href=\"https:\/\/wordpress.com\" data-layout=\"button_count\"><\/div>",
            "preview_smart_js": "<div id=\"fb-root\"><\/div><script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = \"\/\/connect.facebook.net\/en_US\/sdk.js#xfbml=1&appId=249643311490&version=v2.3\"; fjs.parentNode.insertBefore(js, fjs); }(document, \"script\", \"facebook-jssdk\"));<\/script>"
        },
        "linkedin": {
            "ID": "linkedin",
            "name": "LinkedIn",
            "shortname": "linkedin",
            "icon": "\f207",
            "preview_smart": "<div class=\"linkedin_button\"><script type=\"in\/share\" data-url=\"http:\/\/wordpress.com\" data-counter=\"right\"><\/script><\/div>",
            "preview_smart_js": "<script type=\"text\/javascript\">\n\t\t\tjQuery( document ).ready( function() {\n\t\t\t    jQuery.getScript( '\/\/platform.linkedin.com\/in.js?async=true', function success() {\n\t\t\t        IN.init();\n\t\t\t    });\n\t\t\t});\n\t\t\tjQuery( document.body ).on( 'post-load', function() {\n\t\t\t\tif ( typeof IN != 'undefined' )\n\t\t\t\t\tIN.parse();\n\t\t\t});\n\t\t\t<\/script>"
        },
        "reddit": {
            "ID": "reddit",
            "name": "Reddit",
            "class_name": "Share_Reddit",
            "icon": "\f222",
            "preview_smart": "<div class=\"reddit_button\"><\/iframe><\/div>",
            "preview_smart_js": ""
        },
        "stumbleupon": {
            "ID": "stumbleupon",
            "name": "StumbleUpon",
            "shortname": "stumbleupon",
            "icon": "\f223",
            "preview_smart": "<div class=\"stumbleupon_button\"><\/iframe><\/div>",
            "preview_smart_js": ""
        },
        "twitter": {
            "ID": "twitter",
            "name": "Twitter",
            "shortname": "twitter",
            "icon": "\f202",
            "preview_smart": "<div class=\"twitter_button\"><\/iframe><\/div>",
            "preview_smart_js": "\t\t<script type=\"text\/javascript\">\n\t\tjQuery(document).on( 'ready post-load', function(){\n\t\t\tjQuery( 'a.share-twitter' ).on( 'click', function() {\n\t\t\t\twindow.open( jQuery(this).attr( 'href' ), 'wpcomtwitter', 'menubar=1,resizable=1,width=600,height=350' );\n\t\t\t\treturn false;\n\t\t\t});\n\t\t});\n\t\t<\/script>\n\t\t"
        },
        "press-this": {
            "ID": "press-this",
            "name": "Press This",
            "shortname": "pressthis",
            "icon": "\f205",
            "preview_smart": "<a rel=\"nofollow\" class=\"share-press-this sd-button\" href=\"http:\/\/en.blog.wordpress.com\/2014\/02\/10\/new-sharing-reblogging\/?share=press-this\" title=\"Click to Press This!\"><span>Press This<\/span><\/a>",
            "preview_smart_js": ""
        },
        "google-plus-1": {
            "ID": "google-plus-1",
            "name": "Google",
            "shortname": "googleplus1",
            "icon": "\f218",
            "preview_smart": "<div class=\"googleplus1_button\"><div class=\"g-plus\" data-action=\"share\" data-annotation=\"bubble\" data-href=\"http:\/\/wordpress.com\"><\/div><\/div>",
            "preview_smart_js": "\t\t\t<script type=\"text\/javascript\">\n\t\t\t  (function() {\n\t\t\t    var po = document.createElement('script'); po.type = 'text\/javascript'; po.async = true;\n\t\t\t    po.src = 'https:\/\/apis.google.com\/js\/plusone.js';\n\t\t\t    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);\n\t\t\t  })();\n\t\t\t<\/script>\n\t\t\t"
        },
        "tumblr": {
            "ID": "tumblr",
            "name": "Tumblr",
            "shortname": "tumblr",
            "icon": "\f214",
            "preview_smart": "<a target=\"\" href=\"http:\/\/www.tumblr.com\/share\/link\/?url=http%3A%2F%2Fwordpress.com&name=A%20New%20Design%20for%20Sharing%20and%20Reblogging%20\" title=\"Share on Tumblr\" style=\"display:inline-block; text-indent:-9999px; overflow:hidden; width:62px; height:20px; background:url('\/\/platform.tumblr.com\/v1\/share_2.png') top left no-repeat transparent;\">Share on Tumblr<\/a>",
            "preview_smart_js": "<script type=\"text\/javascript\" src=\"\/\/platform.tumblr.com\/v1\/share.js\"><\/script>"
        },
        "pinterest": {
            "ID": "pinterest",
            "name": "Pinterest",
            "shortname": "pinterest",
            "icon": "\f209",
            "preview_smart": "<div class=\"pinterest_button\"><a href=\"http:\/\/pinterest.com\/pin\/create\/button\/?url=http%3A%2F%2Fwordpress.com&description=A%20New%20Design%20for%20Sharing%20and%20Reblogging%20\" data-pin-do=\"buttonBookmark\" data-pin-config=\"beside\"><img src=\"\/\/assets.pinterest.com\/images\/pidgets\/pinit_fg_en_rect_gray_20.png\" \/><\/a><\/div>",
            "preview_smart_js": "\t\t\t\t\t<script type=\"text\/javascript\">\n\t\t\t\t\/\/ Pinterest shared resources\n\t\t\t\tvar s = document.createElement(\"script\");\n\t\t\t\ts.type = \"text\/javascript\";\n\t\t\t\ts.async = true;\n\t\t\t\ts.src = window.location.protocol + \"\/\/assets.pinterest.com\/js\/pinit.js\";\n\t\t\t\tvar x = document.getElementsByTagName(\"script\")[0];\n\t\t\t\tx.parentNode.insertBefore(s, x);\n\t\t\t\t\/\/ if 'Pin it' button has 'counts' make container wider\n\t\t\t\tjQuery(window).load( function(){ jQuery( 'li.share-pinterest a span:visible' ).closest( '.share-pinterest' ).width( '80px' ); } );\n\t\t\t<\/script>\n\t\t"
        },
        "pocket": {
            "id": "pocket",
            "name": "Pocket",
            "shortname": "pocket",
            "icon": "\f224",
            "preview_smart": "<div class=\"pocket_button\"><a href=\"https:\/\/getpocket.com\/save\" class=\"pocket-btn\" data-lang=\"en\" data-save-url=\"http:\/\/wordpress.com\" data-pocket-count=\"horizontal\" >Pocket<\/a><\/div>",
            "preview_smart_js": "\t\t<script>\n\t\t\/\/ Don't use Pocket's default JS as it we need to force init new Pocket share buttons loaded via JS.\n\t\tfunction jetpack_sharing_pocket_init() {\n\t\t\tjQuery.getScript( 'https:\/\/widgets.getpocket.com\/v1\/j\/btn.js?v=1' );\n\t\t}\n\t\tjQuery( document ).on( 'ready', jetpack_sharing_pocket_init );\n\t\tjQuery( document.body ).on( 'post-load', jetpack_sharing_pocket_init );\n\t\t<\/script>\n\t\t"
        },
        "telegram": {
            "ID": "telegram",
            "name": "Telegram",
            "shortname": "telegram",
            "preview_smart": "<a rel=\"nofollow\" class=\"share-telegram sd-button\" href=\"http:\/\/en.blog.wordpress.com\/2014\/02\/10\/new-sharing-reblogging\/?share=telegram\" title=\"Click to Telegram!\"><span>Telegram<\/span><\/a>",
            "preview_smart_js": ""
        },
        "jetpack-whatsapp": {
            "ID": "jetpack-whatsapp",
            "name": "WhatsApp",
            "shortname": "jetpack-whatsapp",
            "preview_smart": "<a rel=\"nofollow\" class=\"share-jetpack-whatsapp sd-button\" href=\"whatsapp:\/\/send?text=http:\/\/en.blog.wordpress.com\/2014\/02\/10\/new-sharing-reblogging\/\" title=\"Click to WhatsApp!\"><span>WhatsApp<\/span><\/a>",
            "preview_smart_js": ""
        },
        "skype": {
            "ID": "skype",
            "name": "Skype",
            "shortname": "skype",
            "icon": "\f220",
            "preview_smart": "<a rel=\"nofollow\" class=\"share-skype share-icon\" href=\"javascript:void(0);return false;\" title=\"Skype\"><span><\/span><\/a>",
            "preview_smart_js": ""
        }
    },
    "more": {
        "icon": "\f415"
    }
}