Skip to content

Instantly share code, notes, and snippets.

for (var i = 1; i <= 100; i++){
// Stuff you want to happen on each loop goes here
('.facebookPhotos').append('<img src="https://graph.facebook.com/100004786450083/picture?type=large">');
} //for
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
$('.facebookPhotos').append("Hello");
$('.facebookPhotos').append("<img src='https://graph.facebook.com/100004786450083?width=150&height=150' />");
<meta property="og:image" content="http://davidwalsh.name/wp-content/themes/klass/img/facebooklogo.png"/>
<meta property="og:title" content="Facebook Open Graph META Tags"/>
<meta property="og:url" content="http://davidwalsh.name/facebook-meta-tags"/>
<meta property="og:site_name" content="David Walsh Blog"/>
FB.api('/me/friends', function(response) {
//stuff you want to happen after getting data goes here
$('.container').append(response.data[0].name);
}); //FB.api
<div class='container'></div>