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

Page Public Content Access #121

Open sandro-ts opened 6 years ago

sandro-ts commented 6 years ago

First of all,

I'd like to say huge thank you for posting this code, it's been very helpful to download the posts and comments from certain pages I'm making a study about.

Recently facebook started giving out HTTP 400 errors, since the token doesn't include the detail "Page Public Content Access" that would make this code work.

What is the solution, how did you guys get that permission?

Thanks

zhaohangbo commented 6 years ago

same question @juander

zhaohangbo commented 6 years ago

image

zhaohangbo commented 6 years ago

to solve the issue, do like this. image

sandro-ts commented 6 years ago

@zhaohangbo Could you elaborate? This is what I'm seeing

screenshot at jul 17 19-11-14

semmet95 commented 6 years ago

I'm only scraping post text and images from a public page. When I submit the app for review adding the Page Public Content Access permission I get the response that my app doesn't need this permission and it's not enabled. The app worked for a few days but now I'm getting the 400 error again and opening the url on browser I can see the response which says that i need to get the Page Public Content Access permission.

semmet95 commented 6 years ago

@juander As mentioned I your screenshot, you need to fill in some details about your app before you can submit the app for review.

noahmanion commented 5 years ago

I had the same error when trying the API call through FB's API explorer, which defaults to the most recent API version. When setting the API version in the explorer to 2.9 (the version in the script), the call worked just fine. I noticed that when removing the since & until params (and their references in the code), I was able to run the script just fine.

sandro-ts commented 5 years ago

@noahmanion Thanks for the update, I'm not seeing v2.9 in the explorer though, only v3.0 and upwards.

rgdagir commented 5 years ago

I'm developing an internal tool for a side project. Is there any way of going around this problem without applying for the permission? Such a bureaucratic process.

shoeb240 commented 5 years ago

If your app need access token for a page that has same admin as the app then you can get it using manage_pages permission, otherwise (for pages has different admins) you need "Page Public Content Access" permission.