1👍
✅
If the user authorizes this as an app, with the permissions publish_stream
(to publish stories to the News Feeds of the user and their Friends) and user_likes
(to have access to the pages at the user has ‘liked’),
you can use:
https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&grant_type=client_credentials
to create an App access token. Since these do not often change, you can store it if you like, but it may be wise to make the above request each time, so that in case it does change, you are somewhat protected.
Then, use the Graph API, JS SDK or PHP SDK to publish the story, which is quite straightforward.
Source:stackexchange.com