javascript - Security risk when exposing Facebook access_token? -


i'm pulling list of facebook albums page using url so:

https://graph.facebook.com/<page-id>/albums?access_token=<app-id>|<app-secret>

even though page public, apparently have provide access_token pull content. so, question is, huge security vulnerability publicly displaying app id , secret key in browser? i'm using javascript, i'm afraid grab app id , secret key , use post spam account. possible? or forgetting security step has taken in order write using api?

you should never expose tokens (that not user’s own access token) in client-side code. can read them there, , abuse them. app access token allows lot of app settings changed, , performing of other actions in name of app well.

you need either make viewing user login app, can use personal access token; or need move code server side.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -