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 663 forks source link

Comments dictionary changed format #98

Open alvin-leong opened 6 years ago

alvin-leong commented 6 years ago

Facebook seems to have removed the "from" property from Comments. This causes a problem for the comment_author field in the comments scraper. Is there a possible workaround?

iamrajeshchauhan commented 6 years ago

That's true me too getting same error

philippnkling commented 6 years ago

For me, the same error occurs. Will someone adapt the existing script in the next weeks?

matthiasfru commented 6 years ago

Just FYI, as of 06/02, getting User information now requires a page access token (you need to be admin of that page afaik). It appears that this change is permanent for all versions of the API. see https://developers.facebook.com/ads/blog/post/2017/11/07/marketing-api-v211/ So I guess the "workaround" is to replace

comment_author = unicode_decode(comment['from']['name'])

with

comment_author = None
leduyloc commented 6 years ago

Yes, maybe because many competitive pages try to scan user's information of other pages so facebook locks this feature.

wachmann commented 6 years ago

Thanks, @matthiasfru. That really sucks though :/

iamrajeshchauhan commented 6 years ago

Hi @matthiasfru , Thanks for the twisting the code.

However, is there any other source to get the comment authour name ???