Open this link https://developers.facebook.com/apps/. If you haven't created a Facebook app before, you will be redirected to home page. Click on "Get Started" to do a quick register.
If you already regsitered before, it will show you a button to create a new app.
Click on Crate App button to create a new app.
Select "More Options" and click on continue.
In the next page, select "Something Else" and click on Continue
Fill the details and click on "Create App"
Your app is now created.
Now visit Graph API Explorer (https://developers.facebook.com/tools/explorer)
Select your app from the dropdown.
Click on "Get Token" and choose 'Get User Access Token'.
Click 'Generate Access Token'.
It may ask you for permission. Grant the access.
Select all permissions as shown in following image and then click on 'Generate Access Token' again. It may ask you to grant permissions, grant it.
Once permission is granted, It will generate an access token which is short lived and auto expire after 1hr. We have to extend it. Click on info icon and choose "Open in Access Token Tool"
Click on "Extend access token".
And then click on "Debug". You will now get the long lived access token at the top.