New to here, and Ionic framework but loving it already. I was trying to create an app using Facebook graph API but have been reading how to access the API i cannot pass the app access_token needed by Facebook via client side requests. This is similar to this issue on stack overflow
. I don’t want to have users to login to Facebook, Whats the simplest way to accomplish this which is also secure. I read the access_token can be kept server side. Is this possible with Ionic? Can someone please guide me as to how to accomplish this with an access_token for the app without having users to login through Facebook. Any reference to a code sample or tutorial how to do this would be great, your helps appreciated. Thanks!!
bump… Anyone with any feedback? I am sure people have tried to use Ionic with Facebooks Graph API and access_tokens
ehhm i do not know how you want to get the access_token without a login before?
You could use the facebook-login plugin there is a method to check if the user is already logged in and there you get the current access_token.
Hi bengtler, I should’ve mentioned this i meant an app_access_token based on the app_id and secret and not the user access_token which is generated when the user logs in FB.
access_token = YOUR_APP_ID|YOUR_APP_SECRET
However this is not recommended to be used for Client side requests since this can be seen by anyone in the requests and you don’t want the app_secret to be public info. This post on stack overflow asks the same question