I am developing web project, there users can add their instagram/facebook accounts. After they add their account I need to pull profile data(posts, like counts etc). which method is good to do that. Scraping or instagram/facebook API integration?
I am using python for the project
Question posted in Facebook API
The official documentation for the Facebook APIs can be found here.
The official documentation for the Facebook APIs can be found here.
2
Answers
Certainly scraping will work in the beginning, might get you blocked for bott-ing though. Also I believe it’s probably against the guidelines.
I’ve used Selenium w. Python before to scrape data ( also from Instagram ). To get this to work properly I’ve randomized most of the actions so it’s harder to be detected as a bot.
Also for scraping specific fields I found XPath’s to be quite useful.
Facebook and Instagram load a lot of it’s content dynamically (e.g.: when you scroll) so do keep in mind that you have to implement these ‘human’-actions to scrape effectively.
Certainly Facebook and Instagram API are the straight forward approaches 🙂
You should use social authentication of Python. Based on the web framework you are using, packages would be available.