I need to send a message, may be any possible message in Facebook, to a friend through an app i created. I want to invite some of my friends to a private poll. En some other friends to an other private poll.
Now I do the following with the Facebook graph api:
$array = array(
'message' => $user->getName() . ' invited you to join ' . $poll->getName(),
'link' => 'http://www.example.com/poll/' . $poll->getId(),
'privacy' => "{'value':'SELF'}",
);
$fb->api('/[facebook_friend_id]/feed','POST',$array);
But when this is send from my application the message on my friends wall will be visible to everyone. But I only want this friend to fill in this poll, and not anyone else.
I found that the parameter of privacy doesn't work when a message is send through an application. I don't want to use the javascript SDK, because the layout and the implemention don't fit the expectations for our app.
So we only need a, only server-side, way to send a message or notification to a friend which only my friend and I can see. All the answers I found were like two years old, so a lot happend during that time.