0

I'm building my own social platform on top of facebook, and some advice on the architecture of my web app would be welcome.

I need some data that is returned from the Facebook APIs, in order to get that data I know I need to make my users login with Facebook ( OAuth 2.0 ). After this is where I'm a little bit confused.

Should I call Facebook APIs from the backend ( I'm using Python ) and then return that same data back as a response?

Should I call Facebooks API from the front end ( browser's Javascript ) and then sent that data again to my backend?

Once the user has authorized my app, can the backend keep getting info from facebook APIs?.

Thanks in advance.

1 Answers1

0

Once you get the Facebook Access Token is really up to you how you use it. It is perfectly fine if you only access the Facebook API from the browser and also if you do it from the server. It all depends on what you want to achieve.

If you want the backend to have access to the Facebook API it needs to have the access token. Also, the token has an expiration date, so as long as it is valid, the backend can keep requesting data from Facebook, but once it expires you'll have to renew it.