Send SPAM messages to fb friends using python

The python code is............




import fbchat
from getpass import getpass
user = str(raw_input("Username: "))
client = fbchat.Client(user, getpass())
no = int(raw_input("Number of friends: "))
for i in xrange(no):
    name = str(raw_input("Name: "))
    friends = client.getUsers(name)
    friend = friends[0]
    msg = str(raw_input("Message: "))
    for i in range(100):     #Change the number 100 to your choice
        sent = client.send(friend.uid, msg)
    if sent:
        print("Message sent successfully!")



For this fbchat module is required.
Insall it by executing

sudo pip install fbchat

 

Explenation:
First username & password of fb is asked.
Enter it to login.
Then type the message and click enter.

 

Comments

Popular posts from this blog

Complementary Color

How to extract tweets from python.