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
Post a Comment