views:

12

answers:

0

I've got a curl function in php which posts a status update to our facebook page. However, when I post the update it makes the status appear from me personally rather than me the group.

Does anyone know how you can post as administrator of the group.

The script is as follows;

$xPost['access_token'] = "[key]"
$xPost['message'] = "Posting a message test.";
$query = http_build_query($xPost); 

$ch = curl_init('https://graph.facebook.com/broadland/feed'); 
curl_setopt($ch, CURLOPT_VERBOSE, 1); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_HEADER, 1); 
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_POSTFIELDS, $query); 
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);  
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 
curl_setopt($ch, CURLOPT_CAINFO, NULL); 
curl_setopt($ch, CURLOPT_CAPATH, NULL); 
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0); 

$result = curl_exec($ch);