Post to a Facebook user's wall from a page or app

16,096

Solution 1

It's not possible to post on the user's wall as app or page. And even if it's possible, it's not recommended!

Your best bet if you want to notify your fans about something is to post on your page's wall (as your page) where this post will appear in your fans news feed.

Also this can be done for your website fans (Likers): https://developers.facebook.com/blog/post/465/

Solution 2

you are authorizing the app with your users credentials as you said, right? That's why your posts are created by that user. You have to authorize the app with user name who has access to the page admin section.

And use from and to payload to facebook api.

Ref: https://developers.facebook.com/docs/reference/api/post/

Share:
16,096
Andrew
Author by

Andrew

Self-taught web-allrounder. Can usually be found working on sites for clients in New Zealand and America, or selling my geeky kids books a *con near you!

Updated on June 04, 2022

Comments

  • Andrew
    Andrew almost 2 years

    I can get a user to authorize my app and later on I can post on their wall with this code:

    new Facebook(...);
    $facebook->api('/'.$uid.'/feed', 'post', array('message' => 'My app says hi'));
    

    This works but the post that appears on the user's wall is by the user (it has their face and name next to the post with "via My App" next to it). Is there a way to have the post appear to be by the app (or my page) with my profile photo and name next to it?

    I have tried many variations of the above including getting the app access token explicitly as documented but this gives the same result.

    Is it possible for an app or page to post on a user's wall as itself rather than pretending to be the user?

  • Andrew
    Andrew about 12 years
    From testing all the suggestions here and more research online, it appears you're right, I can not post to a follower's wall. Posting on my page as my page can still achieve the result I'm looking for, provided that I can also add an @mention to the user.
  • Andrew
    Andrew about 12 years
    I authorize the user initially but the actual request in my first example is run separately, while the user is not logged in. Unfortunately the to and from fields don't solve the issue, I believe those are readonly. After further testing and research I don't actually think what I am trying to do is possible.
  • Andrew
    Andrew about 12 years
    To wrap up, @mentioning is not possible either. I find it odd that FB will allow me to post on a user's wall if I pretend to be that user, but I can't post as myself - it seems like they only allow the less transparent option.