when I use
$facebook->api("/userId/feed/", 'POST', $attachment);
Facebook post to my friends wall who authenticated with my application.
I don’t want this.
And when I use
$facebook->api("/me/feed/", 'POST', $attachment);
Facebook post to my feed only.
so I want my APP to post $attachment array to my feed (as me) and every authenticated user feed (as him) without posting to friends wall. (sure I have stream_publish permission from authentication process)
When you authenticate the user and the user authorizes your application’s permissions, Facebook provides you with an access token for that specific user. You need to persist this access token in a database (or where ever you see fit). Each time you make a request to the Facebook API, you need to pass this access token.
So, you can post as a user on their own wall by using the
/me/feedendpoint, but you need to pass the user’s access token along with your request. The access token is how Facebook knows who “me” is referring to.As an example, let’s say I use your application. I authorize your application with my Facebook account and Facebook gives you an access token that represents me. I use your application to post a message on my wall: “Hello World!” You then submit a request to the
/me/feed/endpoint using my access token. The message “Hello World!” will show up on my Facebook wall and shows that it was posted by me.