I'm having problems setting privacy for messages created by my application as a user.
The problem is that all messages get the privacy value set as ALL_FRIENDS using the Graph API, although I explicitly set the privacy value for ALL.
This is the code I use to send:
$query = 'message='. urlencode($message) .'&privacy='. urlencode('{"value":"EVERYONE"}'); $url = 'https://graph.facebook.com/'. $obj_id .'/feed?access_token='. $user_fb_access_token; $curl = curl_init($url); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $query); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0); curl_setopt($curl, CURLOPT_REFERER, $referrer); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($curl); curl_close($curl);
Here it is.
This code worked fine until I noticed it in August.
Does anyone else have this problem?
Mark murfin
source share