From 5e9405e9dcb4fe18b744f1f52fbea5b875c0e09e Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 31 Mar 2012 16:34:28 +0200 Subject: [PATCH] Maximum limit for facebook is now max higher than 400. --- facebook/facebook.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/facebook/facebook.php b/facebook/facebook.php index a15e741d..7282315d 100755 --- a/facebook/facebook.php +++ b/facebook/facebook.php @@ -53,7 +53,10 @@ * - Implement a configuration option to set the polling interval system-wide */ -define('FACEBOOK_MAXPOSTLEN', 420); +// Size of maximum post length increased +// see http://www.facebook.com/schrep/posts/203969696349811 +// define('FACEBOOK_MAXPOSTLEN', 420); +define('FACEBOOK_MAXPOSTLEN', 63206); function facebook_install() { @@ -891,7 +894,8 @@ function facebook_post_hook(&$a,&$b) { $msg = substr($msg, 0, FACEBOOK_MAXPOSTLEN - strlen($shortlink) - 4); $msg .= '... ' . $shortlink; } - if(! strlen($msg)) + + if(!strlen($msg) and !strlen($link) and !strlen($image)) return; logger('Facebook post: msg=' . $msg, LOGGER_DATA);