Advertisement
nasirnobin

Accept all facebook friend request at once

Sep 26th, 2015
729
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2. * Accept All Friend Request
  3. * Author: Nasir Uddin Nobin
  4. * Version: 1.0
  5. *
  6. * How to use: Use firebug console and paste these and RUN it tow times. It will accept all pending request from facebook.
  7. *
  8. * Note: If facebook make any changes to their site structure this code may not able to accept request.
  9. */
  10.  
  11. if(typeof(jQuery)=="undefined"){
  12.     include("jquery");
  13.  
  14. }else{
  15.   accept_req();
  16. }
  17.  
  18. function accept_req(){
  19. var req_count=$("div.bh span.bi.bj a.bk.bl.bm").text();
  20. var req1=req_count.split("("); var req2=req1[1].split(")");
  21.  
  22. var final_req_count=req2[0];
  23.  
  24. var loop_need = Math.floor(final_req_count/10)+1;
  25.  
  26.  
  27. for(i=1; i < loop_need; i++){
  28.     $.get("https://mbasic.facebook.com/friends/center/requests/?ppk="+i+"&tid=u_0_0&bph="+i+"#friends_center_main", function(data){
  29.  
  30.         $("body").html(data);
  31.         $("a.y.z.bv.bb").each(function(){
  32.  
  33.         var url=$(this).attr("href");
  34.  
  35.         $.get(url);
  36.          
  37.         });
  38.  
  39.     });
  40. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement