You can generate never expiring access token without coding, following this instructions:
- Open graph Explorer: https://developers.facebook.com/tools/explorer/.
- Choose your application from the right corner dropdown.
- From “Get Token” dropdown choose your Fan Page.
- Click on submit button to generate token.
- From the left side on “Search for a field” enter access_token and click submit again. Copy this token from the main window.
- Open https://developers.facebook.com/tools/debug/accesstoken and paste token here. Click “Debug”.
- Click the button “Extend Access Token”. This will generate never expiring token.