I am trying to get the application access token to use it in my configuration file, however I can not get it even though the user accepts the app from facebook.
It used to work back in the days but not now. Before I was getting a long string of token but now, my old method does not work so I tried to get it through
https://graph.facebook.com/oauth/access_token?
client_id=YOUR_APP_ID
&client_secret=YOUR_APP_SECRET
&grant_type=client_credentials
However what I get now is xxxxxxxxxxxx|yyyyyyyyyyyyyyy and I believe this is not the correct one because it does not work also.
$facebook->getAccessToken(); used to do the trick but not now.
What can I do about it ?
Thank you
when user comes to your app, try
$facebook->getAccessTokenFromCode($_GET['code']);I was having same issue and this one fixed for me.