JSFiddle - React, Tailwind, and code Playground

by Federico Vázquez

HTML

<div id="pizza">
     <h2>Chocolate type</h2>

    <div class="desc">description</div>
    <div class="price">
        <blink>$ 123</blink>
    </div>
    <button id="order" onclick="enviarjaja();">Order this one</button>
</div>

JavaScript

window.fbAsyncInit = function () {
    FB.init({
        appId: '308117916028807',
        cookie: true, // enable cookies to allow the server to access 
        // the session
        xfbml: true, // parse social plugins on this page
        version: 'v2.1' // use version 2.1
    });
};

// Load the SDK asynchronously
(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/es_ES/sdk.js";
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

function enviarjaja() {
    FB.ui({
        method: 'send',


        link: 'http://www.facebook.com/nike/?lol=mop&pop=jol',


        to: 'coca.cola',
    },

    function (response) {
        if (response && !response.error_code) {
            alert('Posting completed.');
        } else {
            alert('Error while posting.');
        }
        });
}