Created
February 2, 2016 00:19
-
-
Save caionorder/6088d58729399fa0621f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fbCallback(value) { | |
var statusHTML = []; | |
console.dir(value); | |
for (var i=0; i < value.data.length; i++){ | |
var msg; | |
var foto = value.data[i].picture; | |
var link = value.data[i].link; | |
var saida; | |
if(value.data[i].message){ | |
msg = value.data[i].message; | |
} else { | |
msg = 'Confira mais novidades na nossa fanpage ;)'; | |
} | |
saida = '<a href="'+link+'" target="_blank"><div class="boxNovidade wow animated fadeIn">'+ | |
'<div class="imgNovidade"><img src="'+foto+'"/></div>'+ | |
'<div class="infoNovidade">'+ | |
'<span>'+msg+'</span>'+ | |
'</div>'+ | |
'</div></a>'; | |
statusHTML.push(saida); | |
} | |
document.getElementById('recebeFb').innerHTML = statusHTML.join(''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment