This is really interesting, and takes me back to a few months ago, when I tried to read the FB Newsfeed from the console.
I did it more crudely, but I lack the knowledge the OP has, especially seeing how to integrate with React.
I had had an idea for a nice iOS app, which would in part rely on listing Facebook posts from your friends. I thought this would be easy enough, so I designed it before I prototyped, which is something I never do.
Sure enough, when I had finished the design and finally got to prototyping, I realised that Facebook simply no longer allow access to the read_stream API endpoint, unless you get authorisation from them (seems like no one does). Info here: https://developers.facebook.com/docs/facebook-login/permissi...
Fuelled by ingenuity, and because I had the design ready, I thought I'd try and simply load the user's news feed on a UIWebView, and read the data I need from elements in the DOM. I'm pretty sure this is against FB's ToS and wouldn't fly for long, but I kind of want to give it a go anyway.
I got to a place where I proved it works, but not always reliably and it's certainly hacky.
It'll list whatever posts it finds on your feed, and give you some info on them. I believe at the moment I'm skipping ads and not so relevant posts, such as "friend shared a link".
I've also got a bit of code that lets me load more posts, until I've reached the 20 I need to display in the app. This is hackier still.
I've got some challenges though. Like I said, it's hacky and relies on FB not changing certain class names, and because the date for each post comes as a string ("2 hours ago"), I need to find a way to convert that back to a timestamp so I can re-order the posts.
Maybe there's an easier way to do what I was trying to, using a similar approach as the one described in this article?
I had had an idea for a nice iOS app, which would in part rely on listing Facebook posts from your friends. I thought this would be easy enough, so I designed it before I prototyped, which is something I never do.
Sure enough, when I had finished the design and finally got to prototyping, I realised that Facebook simply no longer allow access to the read_stream API endpoint, unless you get authorisation from them (seems like no one does). Info here: https://developers.facebook.com/docs/facebook-login/permissi...
Fuelled by ingenuity, and because I had the design ready, I thought I'd try and simply load the user's news feed on a UIWebView, and read the data I need from elements in the DOM. I'm pretty sure this is against FB's ToS and wouldn't fly for long, but I kind of want to give it a go anyway.
I got to a place where I proved it works, but not always reliably and it's certainly hacky.
If you want to give it a go, load up https://m.facebook.com on your favourite browser, and then copy/paste + run the JS code in this jsFiddle (https://jsfiddle.net/Letwernb/), to your console.
It'll list whatever posts it finds on your feed, and give you some info on them. I believe at the moment I'm skipping ads and not so relevant posts, such as "friend shared a link".
I've also got a bit of code that lets me load more posts, until I've reached the 20 I need to display in the app. This is hackier still.
I've got some challenges though. Like I said, it's hacky and relies on FB not changing certain class names, and because the date for each post comes as a string ("2 hours ago"), I need to find a way to convert that back to a timestamp so I can re-order the posts.
Maybe there's an easier way to do what I was trying to, using a similar approach as the one described in this article?