Navbar
Ariezkhy
Cari Blog Ini
css
Minggu, 17 Juli 2011
user detail+daftar friends
user detail+daftar friends
Diposting oleh
Histerz Blog
di
05.50
·
langsung waelah sok tahh di copy ... simpen di gadget html/javascript ...
user detail+daftar prenn
<div id="fb-root"></div> <div id="fb-konten" style="width:100%; overflow:auto; white-space:nowrap;"> <center> <img src="http://images.gmx.com/images/outsource/application/mailclient/mailcom/resource/mailclient/widgets/blue/common/loading_animation_en-3447255655.gif"/> </center> </div> <script> window.fbAsyncInit = function() { FB.init({appId: '264887889270', status: true, cookie: true, xfbml: true}); FB.getLoginStatus(function(response) { if (response.session) { userUdahLogin(response); }else{ userBelomLogin(); } }); }; (function() { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); }()); function userUdahLogin(datanya){ document.getElementById('fb-konten').innerHTML='<b><i>ini adalah hasil dari FB.getLoginStatus</i></b><hr/>'; for(x in datanya){ if(datanya[x]=='[object Object]'){ document.getElementById('fb-konten').innerHTML+='<b>'+x+':</b><br/>'; for(y in datanya[x]){ document.getElementById('fb-konten').innerHTML+=' <b>'+y+':</b> '+datanya[x][y]+'<br/>'; } }else{ document.getElementById('fb-konten').innerHTML+='<b>'+x+':</b><br/> '+datanya[x]+'<br/>'; } } if(datanya.session.uid){ var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//graph.facebook.com/'+datanya.session.uid+'/?callback=tulisDataUser'; document.getElementById('fb-root').appendChild(e); } } function userBelomLogin(){ document.getElementById('fb-konten').innerHTML='<hr/><h3><a onClick="suruhLoginDulu()" style="cursor:pointer;">Login dong coy :P</a></h3><hr/>'; } function tulisDataUser(datanya){ document.getElementById('fb-konten').innerHTML+='<hr/><h3>Hello <a href="'+datanya.link+'" target="_blank">'+datanya.name+'</a></h3><hr/>'; document.getElementById('fb-konten').innerHTML+='<b><i>ini adalah hasil dari http://graph.facebook.com/'+datanya.id+'/</i></b><hr/>'; for(x in datanya){ if(datanya[x]=='[object Object]'){ document.getElementById('fb-konten').innerHTML+='<b>'+x+':</b><br/>'; for(y in datanya[x]){ document.getElementById('fb-konten').innerHTML+=' <b>'+y+':</b> '+datanya[x][y]+'<br/>'; } }else{ document.getElementById('fb-konten').innerHTML+='<b>'+x+':</b><br/> '+datanya[x]+'<br/>'; } } lodPren(0,9); } function suruhLoginDulu(){ FB.login(function(response){ if (response.session){ userUdahLogin(response); }else{ userBelomLogin(); } }, {perms:'read_stream,publish_stream'}); } var dptrFrn; function lodPren(dr,smp){ document.getElementById('fb-konten').innerHTML+='<div id="daptar-temen"><center><img src="http://images.gmx.com/images/outsource/application/mailclient/mailcom/resource/mailclient/widgets/blue/common/loading_animation_en-3447255655.gif"/></center></div>'; FB.api('/me/friends', function(response) { if(response.data){ dptrFrn=[]; for(x in response.data){if(response.data[x].id && response.data[x].name){dptrFrn[x]=response.data[x].id+'_nm:'+response.data[x].name}} dptrFrn = dptrFrn.sort(function() {return 0.5 - Math.random()}); tlsPren(dr,smp); } }); } function tlsPren(dr,smp){ document.getElementById('daptar-temen').innerHTML='<hr/><b><i>ini adalah hasil dari FB.api\(\'/me/friends\'</i></b><hr/><h3 style="font-weight:normal; text-align:center;"><b>'+(dr+1)+'</b> to <b>'+smp+'</b> of <b>'+dptrFrn.length+'</b> Friends</h3><hr/>'; if(smp>dptrFrn.length){smp=dptrFrn.length} if(dr<0){dr=0} for(x=dr; x<smp; x++){ document.getElementById('daptar-temen').innerHTML+='<table><tbody><tr><td style="vertical-align:top;"><img src="http://graph.facebook.com/'+dptrFrn[x].split('_nm:')[0]+'/picture?type=square" style="width:50px; height:50px;"/></td><td style="vertical-align:top;"><a href="http://www.facebook.com/profile.php?id='+dptrFrn[x].split('_nm:')[0]+'" target="_blank"><b>'+dptrFrn[x].split('_nm:')[1]+'</b></a><br/><label for="'+dptrFrn[x].split('_nm:')[0]+'" style="vertical-align:middle;">ID:</label> <input id="'+dptrFrn[x].split('_nm:')[0]+'" type="text" value="'+dptrFrn[x].split('_nm:')[0]+'" onClick="this.select();" readonly="readonly" style="border:0px; padding:0px; margin:0px; vertical-align:middle; width:100px; font-size:10px;"/></td></tr></tbody></table>'; } if(dr==0){ document.getElementById('daptar-temen').innerHTML+='<hr/><center style="font-weight:bold;"><a class="uiButton" style="margin-right:30px;" onClick="tlsPren('+(dptrFrn.length-10)+','+(dptrFrn.length)+')">..Prev</a> <a class="uiButton" onClick="tlsPren('+smp+','+(smp+10)+')">Next..</a></center><hr/>'; }else if(smp==dptrFrn.length){ document.getElementById('daptar-temen').innerHTML+='<hr/><center style="font-weight:bold;"><a class="uiButton" style="margin-right:30px;" onClick="tlsPren('+(dr-10)+','+dr+')">..Prev</a> <a class="uiButton" onClick="tlsPren(0,10)">Next..</a></center><hr/>'; }else{ document.getElementById('daptar-temen').innerHTML+='<hr/><center style="font-weight:bold;"><a class="uiButton" style="margin-right:30px;" onClick="tlsPren('+(dr-10)+','+dr+')">..Prev</a> <a class="uiButton" onClick="tlsPren('+smp+','+(smp+10)+')">Next..</a></center><hr/>'; } } </script> </div> </center>
sokk lahh di save ...
semoga
tidak
berhasil ......:D
script bolleh nyurii dikit sma k'irLan
:p
Tidak ada komentar:
Posting Komentar
Posting Lebih Baru
Posting Lama
Beranda
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar