security - Facebook Graph Api secure calls with Javascript -


i have web app fetching latest post public facebook page, , displaying post's background image. works localhosted, access_token displaying it's full glory in chrome developer tools. of course bad practice, , i'm looking ways securely request access_token server/external service.

the point of app able fetch information facebook page without requesting user login client. of now, understand requires admin access_token in order fetch info, maybe i'm wrong here? there easier way fetch latest post info public facebook page? don't understand why facebook requires admin token fetch publicly available info?

i don't understand why facebook requires admin token fetch publicly available info?

facebook doesn't want anonymous requests api. that's why access token required.

the point of app able fetch information facebook page without requesting user login client.

you still need access token. said, it's not idea request on client since requires secrets. so, you'll have go server-side (e.g. nodejs). make request to:

https://graph.facebook.com/oauth/access_token? client_id=app_id&client_secret=app_secret& grant_type=client_credentials 

and send either token or fetched data client. set own api this, actually.

otherwise scraping posts casperjs or similar, not great developer experience though.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -