├── comments.py └── README.md /comments.py: -------------------------------------------------------------------------------- 1 | import httplib, urllib 2 | from bs4 import BeautifulSoup 3 | import os 4 | import json 5 | import time 6 | 7 | access_token='Paste your access token here' 8 | # access_token = raw_input('Paste your access token here :') 9 | 10 | conn = httplib.HTTPSConnection("graph.facebook.com") 11 | print 'Please Wait!' 12 | 13 | def comment(url): 14 | connect = httplib.HTTPSConnection("graph.facebook.com") 15 | connect.request("GET",url) 16 | for x in xrange(10): # make it 10, 100, 1000, 10000 17 | 18 | print 'commenting %d '% x 19 | path ='/'+'PUT FB STATUS ID HERE'+'/comments' 20 | param_data={ 'format':'json', 21 | 'message':'<3', # change message from here 22 | 'access_token':access_token 23 | } 24 | connect = httplib.HTTPSConnection("graph.facebook.com") 25 | connect.request("POST",path,urllib.urlencode(param_data),{}) 26 | time.sleep(0.09) 27 | 28 | url='/PUT FB STATUS ID HERE' 29 | comment(url) 30 | print 'DONE!' 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # facebook-mass-comment 2 | 3 | > comments 'n' times on any facbook post of a person or page. 4 | 5 | ## Authenticity 6 | 7 |

8 | 9 |

10 | [Post](https://www.facebook.com/rishi.giri.90/posts/742132415898894) 11 | 12 | # Running 13 | 14 | > python comments.py 15 | 16 | # Usage 17 | 18 | ## Token 19 | ```py 20 | access_token = 'Paste your access token here' 21 | 22 | Replace the text with the access token given by facebook. 23 | ``` 24 | ## Total Comment 25 | ```py 26 | for x in xrange(10): 27 | 28 | Replace '10' with any number to comment that much time on a post. 29 | ``` 30 | ## Message 31 | ```py 32 | param_data = { ' format':'json', 33 | 'message':'<3', # change message from here 34 | 'access_token':access_token 35 | } 36 | ``` 37 | ## Post ID 38 | ```py 39 | path ='/'+'PUT FB STATUS ID HERE'+'/comments' 40 | 41 | url='/PUT FB STATUS ID HERE' 42 | 43 | You have to replace __PUT FB STATUS ID HERE__ with the actual ID of a facebook post. 44 | ``` 45 | ## Time 46 | ```py 47 | time.sleep(0.09) 48 | 49 | You can randomly generate time to save yourself from getting blocked. 50 | ``` 51 | 52 | ## Full Tutorial 53 | 54 | [Mass Commenting on Facebook Post](https://rishicodes.wordpress.com/2015/10/15/mass-commenting-on-facebook-posts) 55 | 56 | # Installation 57 | 58 | > sudo apt-get install python-pip 59 | 60 | ### Modules needed : 61 | 62 | - __httplib2__ 63 | > sudo pip install httplib2 64 | 65 | - __urllib3__ 66 | > sudo pip install urllib3 [ install Certifi and PyOpenSSL ] 67 | 68 | - __bs4__ 69 | > sudo pip install bs4 70 | 71 | - __json__ 72 | > sudo pip install json 73 | 74 | ## License 75 | 76 | MIT © [Rishi Giri](http://rishigiri.com) 77 | --------------------------------------------------------------------------------