]> git.mxchange.org Git - friendica-addons.git/commitdiff
Maximum limit for facebook is now max higher than 400.
authorMichael Vogel <icarus@dabo.de>
Sat, 31 Mar 2012 14:34:28 +0000 (16:34 +0200)
committerMichael Vogel <icarus@dabo.de>
Sat, 31 Mar 2012 14:34:28 +0000 (16:34 +0200)
facebook/facebook.php

index a15e741db85980a6dd61855d156debffa1aa0837..7282315d5533e988296d3630cfcfbb8a2250e0d9 100755 (executable)
  * - 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);