I am trying to post a simple message on my wall by using the Facebook PHP SDK but I get some troubles when I try to set up custom privacy rules, here is my code:
try {
$response = (new FacebookRequest(
$session, 'POST', '/me/feed', array(
'message' => @$_GET['message'],
'privacy' => json_encode(array(
'friends' => 'SOME_FRIENDS',
'value' => 'CUSTOM',
'allow' => implode(',', $friends)
))
)
))->execute()->getGraphObject();
echo "Posted with id: " . $response->getProperty('id');
} catch(FacebookRequestException $e) {
echo "Exception occured, code: " . $e->getCode();
echo " with message: " . $e->getMessage();
}
And i get the fallowing error: Exception occured, code: 100 with message: (#100) 'friends' value was not recognized
Someone could help me ?
EDIT The problem is that i do not have the real ID of the the friends, but i do not know how to get it when they do not use my application, any idea ?