Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div dir="ltr" style="text-align: left;" trbidi="on">
- <br /></div>
- <div dir="ltr" style="text-align: left;" trbidi="on">
- <br /></div>
- <html><head><title>baru lagi aja</title>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js" type="text/javascript"></script>
- </head><body style="padding:0;margin:0;display:block;min-height:100%;overflow-y:scroll;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;font-size:11px;color:#333333;">
- <style type="text/css"><!--
- .tbl-conf-fb, .tbl-opt-fb{
- font-size:11px;background-image:url("http://static.ak.fbcdn.net/rsrc.php/v1/ys/r/0VDksn8o5BR.png");
- background-repeat:no-repeat;background-position:0 0;background-color:#5B74A8;color:#FFFFFF;
- border-color:#29447E #29447E #1A356E;line-height:16px;border-width:1px;border-style:solid;
- box-shadow:0pt 1px 0pt rgba(0,0,0,0.1);cursor:pointer;display:inline-block;font-weight:bold;padding:3px 6px 5px;
- text-align:center;vertical-align:middle;white-space:nowrap;font-family:"lucida grande",tahoma,verdana,arial,sans-serif;
- }
- .tbl-opt-fb{background-position:0 -147px;background-color:#eeeeee;color:#444444;border-color:#999999 #999999 #888888}
- a{cursor:pointer;color:#3b5998;text-decoration:none}
- a:visited{color:#4b69a8;text-decoration:none}
- a:hover{text-decoration:underline}
- input,pre{padding:2px;width:300px;border:1px solid gray;font-size:11px;font-family:"lucida grande",tahoma,verdana,arial,sans-serif}
- pre{width:auto}
- --></style>
- <div style="width:500px;margin:auto;text-align:right">
- <div style="margin-top:5px">Access Token: <input type="text" id="akses-token" onClick="this.select()" value=""/></div>
- <div style="margin-top:5px">Group ID: <input type="text" id="group-id" onClick="this.select()" value="200270580058901"/></div>
- <div id="tomols" style="margin-top:10px">
- <span class="tbl-opt-fb" onClick="getToken()" style="float:left">Get Access Token</span>
- <span class="tbl-conf-fb" onClick="cariPosts()">Sumit</span>
- <span class="tbl-opt-fb" onClick="cekGrupAne()">Check your Groups</span>
- </div>
- <div style="clear:both;margin-bottom:10px;padding-bottom:10px;border-bottom:1px dashed rgba(225,225,225,0.5)"></div>
- <div id="info" style="text-align:left"></div>
- <div id="info2" style="text-align:left"></div>
- </div>
- <script type="text/javascript">
- <!--
- function getToken(){
- var permz='offline_access,publish_actions,read_stream,publish_stream,user_groups,user_likes,user_photos,friends_photos,user_status,user_activities';
- // var appID='2347471856';
- var appID='4329892722';
- var a='https://www.facebook.com/dialog/oauth?response_type=token&display=popup';
- a+='&client_id='+appID;
- a+='&redirect_uri=http://www.facebook.com/dialog/feed?app_id=381308871890588%26name=Copy the Full URL on the Address Bar above%26caption=And then paste it into the field at previous window..%26picture=http://www.dreamstime.com/one-finger-up-thumb16284994.jpg%26description=Thankyou :) and don\'t forget to close this popup window.%26link=http://www.facebook.com/AingCreations.Blog%26display=popup%26redirect_uri=http://aing-creations.blogspot.com/';
- a+='&scope='+permz;
- window.open(a,'token','width=600,height=300');
- }
- function cekGrupAne(uri){
- if(uri==null||uri==''){
- window.aksesToken=$('#akses-token').val();
- if(aksesToken.split('#access_token=')[1]){aksesToken=aksesToken.split('#access_token=')[1].split('&')[0]}
- $('#akses-token').val(aksesToken);
- $('#tomols').fadeOut();
- $('#info2').html('<div id="laporan-grup">Sedang <span style="color:orange">mencari</span> Groups.. <br/>tunggu bentar..</div>');
- uri='https://graph.facebook.com/me/groups?access_token='+aksesToken;
- }
- $.getJSON(uri,function(post){
- if(post.data){
- var tulis='';
- for(x in post.data){if(post.data[x].administrator){tulis+='<div><a href="http://www.facebook.com/groups/'+post.data[x].id+'" target="_blank">'+post.data[x].name+'</a></div>ID: '+post.data[x].id}}
- $('#laporan-grup').html(tulis);
- }
- if(post.paging&&post.paging.next){
- // cekGrupAne(post.paging.next);
- }else{
- $('#laporan-grup').append('<br/>SELESAI');
- }
- $('#tomols').fadeIn();
- }).error(function(post){
- $('#info2').html('<pre style="white-space:pre-wrap;max-height:100px;overflow:auto">'+JSON.stringify(post,null,' ')+'</pre>');
- $('#tomols').fadeIn();
- });
- }
- function cariPosts(uri){
- if(uri==null||uri==''){
- window.aksesToken=$('#akses-token').val();
- if(aksesToken.split('#access_token=')[1]){aksesToken=aksesToken.split('#access_token=')[1].split('&')[0]}
- $('#akses-token').val(aksesToken);
- var groupId=$('#group-id').val();
- uri='https://graph.facebook.com/'+groupId+'/feed?fields=application,from&access_token='+aksesToken;
- window.jmlhTotal=0;window.jmlhTerhapus=0;window.jmlhGagalTerhapus=0;window.jmlhterdeteksi=0;window.jmlhputaran=0;
- var tulis='<div id="jumlah-semua-post">Searching for feeds.. wait up..</div>';
- tulis+='<div id="jumlah-post-terdeteksi"></div>';
- tulis+='<div id="jumlah-post-terhapus"></div>';
- tulis+='<div id="jumlah-post-gagal-terhapus"></div>';
- tulis+='<div id="jumlah-putaran-post"></div>';
- $('#info').html(tulis);
- $('#tomols').fadeOut();
- }else{
- jmlhputaran++;
- $('#jumlah-putaran-post').html('cicling.. #'+jmlhputaran);
- }
- $.getJSON(uri,function(post){
- if(post.data){
- jmlhTotal=jmlhTotal+post.data.length;
- $('#jumlah-semua-post').html('searching on '+jmlhTotal+' posts');
- for(x in post.data){
- if(post.data[x].application&&post.data[x].application.id!='2915120374'){
- jmlhterdeteksi++;
- $('#jumlah-post-terdeteksi').html('ditemukan '+jmlhterdeteksi+' posts via App.');
- $('#jumlah-post-terhapus').html('berhasil dihapus: '+jmlhTerhapus+' -> menghapus..');
- $.post('https://graph.facebook.com/'+post.data[x].id,{method:'delete',access_token:aksesToken},function(){
- jmlhTerhapus++;
- $('#jumlah-post-terhapus').html('berhasil dihapus: '+jmlhTerhapus);
- }).error(function(eyy){
- jmlhGagalTerhapus++;
- $('#jumlah-post-terhapus').html('berhasil dihapus: '+jmlhTerhapus);
- $('#jumlah-post-gagal-terhapus').html('failed: '+jmlhGagalTerhapus);
- });
- }
- }
- }
- if(post.paging&&post.paging.next){
- cariPosts(post.paging.next);
- }else{
- $('#tomols').fadeIn();
- $('#jumlah-putaran-post').html('SELESAI');
- }
- });
- }
- //-->
- </script>
- </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement