facebookresearch / Ad-Library-API-Script-Repository

GitHub repository of commonly used python scripts that allows everyone to pull data via the Ad Library API
Other
213 stars 84 forks source link

Access Token Required? #2

Closed jkennedy559 closed 2 years ago

jkennedy559 commented 4 years ago

Is the access token required by the -t argument a User, App or Page access token?

skylarcheung commented 4 years ago

@jkennedy559 I used a user access token, which I retrieved by starting a new ad with an arbitrary name using the Graph API. This works fine. I then debugged the token so it would not expire for 2 months.

jkennedy559 commented 4 years ago

Got it resolved thanks. Any chance you have had any success querying the API on specific search_page_ids, I can query on search_terms but when I try the page_id's of a major political party the response is empty. Have they discontinued this feature or am I just being stupid?

skylarcheung commented 4 years ago

I actually have only been using the cURL commands, I don't know how to bypass the init() takes exactly 5 arguments (1 given) error, despite my giving 5 arguments. I've been able to use the scraper from minimaxir on GitHub to scrape ads belonging to specific page ids. The 5000 limit is horrible, though.