provide a test mode for facebook posts which goes through the motions but doesn't actually post content

This commit is contained in:
Friendika 2011-04-28 04:44:17 -07:00
parent 38cb0a3295
commit 0ac4d6ecc9

View File

@ -504,6 +504,10 @@ function facebook_post_hook(&$a,&$b) {
logger('facebook: post to ' . $url); logger('facebook: post to ' . $url);
logger('facebook: postvars: ' . print_r($postvars,true)); logger('facebook: postvars: ' . print_r($postvars,true));
// "test_mode" prevents anything from actually being posted.
// Otherwise, let's do it.
if(! get_config('facebook','test_mode'))
$x = post_url($url, $postvars); $x = post_url($url, $postvars);
$retj = json_decode($x); $retj = json_decode($x);