After many days of stretching my hair over it, I seem to have solved this problem. I will explain:
The reason my messages come from me, not from the page, is because the access_token I used was from my account, not from the page. You will need to get the access token from the page itself.
What is explained here (http://developers.facebook.com/docs/api#auth) in the "Page Simulation" section
Here is how I did it.
First, I gave my account permission to manage the pages that I had with this URL:
https:
you will need to insert client_id with your application id and insert the redirect URL. You will be taken to a page that asks you to allow (that you should say yes :)
then in php I got access to the data of my current account and the pages that I administer using the following code:
require_once 'facebook-php-sdk/src/facebook.php'; $facebook = new Facebook(array( 'appId' => '...', 'secret' => '...' )); $attachment2 = array( 'access_token' => "..."
This will print out information about the pages you are administering and access_tokens for those pages (bingo!)
you can take those / those access_token (s) and paste them into the code I posted above, and whala - it will be placed on your page from the page. :)
source share