FBpy – Automatic Facebook Friends Requester

What is FBpy?

FBpy is an application (or a script, whatever suits you best) that is written in Python. For a given Facebook username and password, it can send multiple friend requests to your “Friends suggestions” that Facebook suggests. Since Facebook will suggest a lot of friends at a time, you can select an interval (a, b) where b>a of pages so that the friends that appear only on these certain pages will be sent a friend request.

Why FBpy?

Mainly FBpy can be used by marketing agencies. On my machine with my current cable internet it sends ~25 friend requests per minute. FBpy only needs Python to run, no need of additional installations of libraries or internet browsers or additional clicks, it works all by itself.

What are Facebook friends suggestions?

It is explained in the graph below.

Click to enlarge

Technical details

The application uses http.cookiejar and urllib. Of course as Facebook keeps information of the currently logged username by using cookies, we need cookiejar. It uses http://m.facebook.com/ due to its simplicity when parsing, and also to save some bandwidth. After the user enters the 4 required parameters (username, password, starting parsing page, number of pages to parse) the application then attempts to connect to Facebook’s login.php. Then it starts a cycle, and for each cycle it parses the n-th page of the “Friends suggestion” page. This is done by visiting http://m.facebook.com/findfriends.php?pymk_index=n. Then for each friend (f) in this page, it sends a request by visiting http://m.facebook.com/connect.php?id=f. As simple as that. After everything is finished the cookies are cleared and the user is logged out.

Is this legal?

I have no idea.

Can I get the program?

Not yet, but you can see a piece of the source code on the next screenshot.

Click to enlarge

FBpy in action

Click to enlarge

Boro Sitnikovski, 10.2011