Currently I am using desktop windows service to download my Facebook page insights/ page likes/friends etc. graph data . so, for that i have added app on my facebook page an
Simple solution just call following functions using PHP SDK
$facebook->setExtendedAccessToken();
and after it get extented access token through
$access_token = $facebook->getAccessToken();
OR
GET /oauth/access_token?
grant_type=fb_exchange_token&
client_id={app-id}&
client_secret={app-secret}&
fb_exchange_token={short-lived-token}