Migme JavaScript SDK. Throws data to the Migme API.
npm install migme
// ES6
import Migme from 'migme'
// CommonJS
var Migme = require('migme')
// AMD
define(['migme'], function (Migme) {
// ...
})
<script>
window.migmeAsyncInit = function() {
MIGME.init({
client_id : 'your-client-id',
version : 'v1.0',
});
};
(function(d, s, id){
var js, mjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.mig.me/lib/sdk.js";
mjs.parentNode.insertBefore(js, mjs);
}(document, 'script', 'migme-jssdk'));
</script>
Create a share button on your site. (Initialization is required)
<div class="migme-share-button"
data-href="http://www.your-domain.com/your-page.html"
data-layout="button">
</div>
MIGME.init({
// options
client_id: 'XXXXXXXXXXXXX',
access_token: '' // If you already have one
})
npm install # Install dependencies
npm test # Test only
npm run build # Build only