You can generate never expiring access token without coding, following this instructions:
- Open graph Explorer.
- Choose your application from the right top corner dropdown.
- Choose your Page From “Get Token” dropdown or if you want to create user token than select “get user access token”.
- On first time Facebook will open permission prompt , allow the permission.
- Click on submit button to generate token.
- From the left side on “Search for a field” enter access_token and click submit again. Copy token from the token field.
- Open Facebook token debugger and paste token here. Click “Debug”.
- Click the button “Extend Access Token” on last of page.
This will generate never expiring token. Now you no need to recreate the token, but when you change the you Facebook account password you need to regenerate the token with same steps.