Go to https://developers.facebook.com/tools/debug/accesstoken/ and use this page to test your tokens at each step, namely looking at their expiry date.
Go to developers.facebook.com and generate a User token with the permissions required.
To post to pages you need pages_show_list, pages_read_engagement, pages_manage_posts, public_profile
.