In my site user get their own secret code with access token and submit That code in my site and from this all code I only want to take access token with the help of php... Check this ScreenShootss.jpg
Example of access token {"session_key":"5.TVJlCXvhgqdhpA.1497109242.26-100007001746590","uid":100007001746590,"secret":"80cc3dc2ba89e635dcf84b41d6efcc38","access_token":"EAAAAAYsX7TsBAEa6qMaCj1qCgnOKFHBcfu76C6PrUdK1LnIh39jmabZAdVWmQLO3Ol64ZCXY4388DBfUwksxONGXE5dUY0mK9M07aszl5Qvs8ccqQ39xLEsK2gc1RUJQ0Kqy1ror7R8EPHZCX6pOzX0o4oQAJ1kOq8Oz0n0GysK64ebCsDEokwG36j1awnYaDoJPvOn2AZDZD","machine_id":"-hI8WaLcNeEVUSPuxcEpmhQU","confirmed":true}
And I also try to separate access token by separating all this code but this actually not working
Here is my php script
if(isset($_POST['submit'])) {
$token2 = $_POST['token'];
if(preg_match("'access_token=(.*?)&expires_in='", $token2, $matches)){
$token = $matches[1];
}
else{
$token = $token2;
}
$extend = get_html("https://graph.facebook.com/me/permissions?access_token=" . $token);
How to do this and thanks in advance