Facebook Page Statuses API

Posted by Simon R on Stack Overflow See other posts from Stack Overflow or by Simon R
Published on 2010-05-18T12:26:45Z Indexed on 2010/05/18 12:31 UTC
Read the original article Hit count: 203

Filed under:
|
|
|

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); 

© Stack Overflow or respective owner

Related posts about php

Related posts about facebook