I'm dabbling and trying to learn web scraping with R.
For example, I wanted to try to check the list of friends on my own Facebook account, how can I do it?
You could start with reading web-scraping-with-r.
I have no connection with the (owners of the) website,
but the page mentions some relevant things/examples.
If you want to target Facebook specifically, then do an internet search for that.
I'd check out this NON CRAN package.
Or this CRAN package;
These leverage the Facebook API, so no need to get in to scraping (which will get you in to trouble on Facebook!)