I figured out how to post something from my WordPress site to a Facebook time line, but I also want to be able to post to a Facebook Page that I manage as well. I would like to post some of the random quotes I’ve generated to my Facebook page.
The code is similar to the code I used to post to a wall or time line, but I have to know on which page to post and if the current user has permission to do so. Here’s the code I used:
This will create a post on a page (
$page_id) with the message
'my message!'. Note: if you try to execute the code more than once, you could get a duplicate message error. I’m not sure how long it is before you can post the same message twice because I was too impatient to wait.