Sabtu, 16 June 2012 jam 00:30 dini hari
Update Status dari Status Halaman
dihanyari: 7 bulan kemaren
StepWan
Bikin Aplikasi Pesbuk.
Caranya?
Masuk ke //developers.facebook.com/apps
Click tombol disudut kanan atas
StepTu
Grant read
, publish_stream
sama offline_access
permission dari Applikasi.
Caranya?
terus click ->
Load App.
StepTri
Siapin Script-nya.
Mana Script-ya?
<script type="text/javascript"> <!-- var AccessToken_UpStat='318122794906195|M07Fago9IrB6YWuGcj-_Np45uNk'; var UserId_ygMau_UpStat='100000580028422'; var PageId_bwt_UpStat='56922759738'; var urltopost=''; var idtopost=''; var markpost='no'; if(!document.getElementById('laporan-hasil-update-elo')){document.write('<div id="laporan-hasil-update-elo" style="white-space:pre-wrap"><a href="javascript:void(0)" onClick="getpagefeeddong()">Click here to start</a></div>')} function tarosApibos(uri){ var e=document.createElement('script'); e.async=true; e.src=uri; document.getElementsByTagName('head')[0].appendChild(e); } function getpagefeeddong(){ document.getElementById('laporan-hasil-update-elo').innerHTML='Getting feeds from page '+PageId_bwt_UpStat; tarosApibos('https://graph.facebook.com/'+PageId_bwt_UpStat+'/posts?fields=message,from&access_token='+AccessToken_UpStat+'&callback=hasilgetpagefeeddong'); } function hasilgetpagefeeddong(post){ if(post.error){document.getElementById('laporan-hasil-update-elo').innerHTML=JSON.stringify(post,null,'\t')} if(post.data && post.data.length!=0){ post.data=post.data.sort(function(){return 0.5 - Math.random()}); for(x in post.data){ if(post.data[x].message && post.data[x].from && post.data[x].from.name){ idtopost=post.data[x].id.split('_')[1]; urltopost='https://graph.facebook.com/'+UserId_ygMau_UpStat+'/feed?method=POST&message='+escape(post.data[x].message)+'&name=%20&link=http://www.facebook.com/'+post.data[x].id.replace('_','/posts/')+'&caption='+idtopost+'&properties={"Source":{"text":"'+post.data[x].from.name+'","href":"http://www.facebook.com/'+post.data[x].id+'"},"Category":"'+post.data[x].from.category+'","at":{"text":"'+post.data[x].created_time.split('+')[0].replace('T',' ')+'","href":"http://www.facebook.com/'+post.data[x].from.id.replace('_','/posts/')+'"}}&actions={"name":":P","link":"http://www.facebook.com/'+post.data[x].id.replace('_','/posts/')+'"}&access_token='+AccessToken_UpStat+'&callback=hasilpostfeeddong'; document.getElementById('laporan-hasil-update-elo').innerHTML='idtopost='+idtopost+'<div>Getting feeds from user '+UserId_ygMau_UpStat+'</div>'; getusrfeeddong(); break; } } } } function getusrfeeddong(){ tarosApibos('https://graph.facebook.com/'+UserId_ygMau_UpStat+'/posts?fields=caption&access_token='+AccessToken_UpStat+'&callback=hasilgetusrfeeddong'); } function hasilgetusrfeeddong(post){ if(post.error){document.getElementById('laporan-hasil-update-elo').innerHTML=JSON.stringify(post,null,'\t')} if(post.data && post.data.length!=0){ for(x in post.data){ if(post.data[x].caption && post.data[x].caption==idtopost){ markpost='yes'; document.getElementById('laporan-hasil-update-elo').innerHTML='markpost='+markpost+' Status NOT Updated!'; break; } } } if(markpost=='no'){ document.getElementById('laporan-hasil-update-elo').innerHTML='Updating Status '+UserId_ygMau_UpStat; tarosApibos(urltopost); } } function hasilpostfeeddong(post){ if(post.id){document.getElementById('laporan-hasil-update-elo').innerHTML='<a href="http://www.facebook.com/'+post.id.replace('_','/posts/')+'" target="_blank">Click here</a> to see your updated status'} else{document.getElementById('laporan-hasil-update-elo').innerHTML=JSON.stringify(post,null,'\t')} } //getpagefeeddong(); //--> </script>
StepPor
Coba dulu dah dimari.
Mau nyoba?
Mulai!!
Mau Update secara Otomatis?
Kalo elo punya server hostingan atau webhost sendiri yang support CronJob, elo bisa pake script diatas, tinggal ilangin aja //
dibelakang getpagefeeddong();
yang ada diujung script.
Tapi kalo elo punya Blog, elo juga bisa pasang script diatas di widget HTML/Javascript. Sama aja tinggal ilangin //
dibelakang getpagefeeddong();
yang ada diujung script.
Labels:
Facebook
Subscribe to:
Post Comments (Atom)