Guest User

Untitled

a guest
Dec 6th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. from fbchat import Client, log
  2. from getpass import getpass
  3.  
  4. username = str(raw_input("Username: "))
  5. password = getpass()
  6.  
  7. client = Client(username, password)
  8.  
  9. name = str(raw_input("Name of that friends you wanna send messages, input like-- Narendra pandey--: "))
  10.  
  11. threads = client.searchForThreads(name)
  12.  
  13. message = str(raw_input("Message to that person: "))
  14.  
  15. for thread in threads:
  16.  
  17. thread = str(thread).split(' ')[3].split('(')[1].split(')')[0]
  18.  
  19. for i in range(num):
  20. client.sendMessage(message, thread_id=thread)
  21.  
  22. break
Add Comment
Please, Sign In to add comment