minimaxir / facebook-page-post-scraper

Data scraper for Facebook Pages, and also code accompanying the blog post How to Scrape Data From Facebook Page Posts for Statistical Analysis
2.12k stars 662 forks source link

Comment Scraper NameError: name 'file_id' is not defined #65

Open 17waldth opened 7 years ago

17waldth commented 7 years ago

Getting this and not sure why:

Traceback (most recent call last): File "get_fb_comments_from_fb.py", line 236, in scrapeFacebookPageFeedComments(file_id, access_token) NameError: name 'file_id' is not defined

Not sure what I need to define. I ran the group scraper and the .csv is in the same folder

quyleanh commented 7 years ago

file_id is prefix in csv file name.

For example: After scraping your Facebook page with id HogwartsVietnam, your file_id must be HogwartsVietnam and you need to put HogwartsVietnam_facebook_statuses.csv file in the same executing folder as well.

haseebmahmud commented 6 years ago

I don't get it. I am having the same trouble. @quyleanh Am I suppose to download to statuses first? I was expecting somewhere I can input the post_id in the code. If not, then is it downloadning thousands of posts with thousands of comments in one csv file?

quyleanh commented 6 years ago

@haseebmahmud did you read the code of get_fb_comments_from_fb.py file? Line 141.

haseebmahmud commented 6 years ago

@quyleanh So silly of me! Somehow I missed that part. Thank you and wishing you a Merry Christmas.

quyleanh commented 6 years ago

@haseebmahmud you're welcome. Happy Christmas!