Vimeo
Code:
SocialDig({
selector: '.vimeo',
service: 'vimeo',
user: 'user55766764',
auth: 'xxxxx'
}, function(data) {
if (data.data.length > 0) {
var list = document.createElement('div');
list.className = 'g g-s-2 videos';
// Loop through the videos
data.data.forEach(function(el, idx, arr) {
if (idx < 4) {
var item = document.createElement('div');
item.className = 'gi video';
var id_pieces = el.uri.split('/');
var id = id_pieces[id_pieces.length-1]
// item.innerHTML = el.embed.html;
item.innerHTML = '<iframe src="https://player.vimeo.com/video/' + id + '?badge=0&autopause=0&player_id=0" width="100%" height="350" frameborder="0" title="' + el.name + '" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
// Add the new item to the list
list.appendChild(item);
}
});
// Add the list to the page
document.querySelector('.vimeo').appendChild(list);
}
});