Facebook PHP API post to wall falls under "Recent Posts by Others"
I want to post a message to the wall of a Facebook Page. I am the admin of
the app and the page used in this code, I already gave permissions needed
for my app to be able to post on my page, it works when I use only the
field "message", like this:
$message = array(
'message' => "Test2",
);
$result = $fb->api('/411895472189524/feed','POST',$message);
The code above posts to my page wall and the post is made "from" the page
itself, just like if I would do it manually from facebook. This is working
great.
But when I try to add more fields like "link" or "picture" or
"description" the post goes in the "Recent Posts by Others on TEST Jojo
Page" and the post is now made from my personnal account (Joelle Landrie)
instead of from the page itself. See code below.
$message = array(
'message' => "Test2",
'picture' =>
"http://www.cleanpopo.com/uploads/1/3/1/5/13154615/245431315.jpg",
'description' => "This is a test description",
'link' => "google.com"
);
$result = $fb->api('/411895472189524/feed','POST',$message);
See: https://www.facebook.com/pages/TEST-Jojo-Page/411895472189524
The "link" field seems to be causing problem, I can get a successful post
on my page using the "message", "picture" and "description" field. Only
this is useless to me, I need my post to have a link...
No comments:
Post a Comment