aboutsummaryrefslogtreecommitdiffstats
path: root/addon/facebook
diff options
context:
space:
mode:
Diffstat (limited to 'addon/facebook')
-rw-r--r--addon/facebook/facebook.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index 17cc8bf56..d5544601a 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -505,6 +505,21 @@ function facebook_post_hook(&$a,&$b) {
$msg = trim(strip_tags(bbcode($msg)));
$msg = html_entity_decode($msg,ENT_QUOTES,'UTF-8');
+ // add any attachments as text urls
+
+ $arr = explode(',',$b['attach']);
+
+ if(count($arr)) {
+ $msg .= "\n";
+ foreach($arr as $r) {
+ $matches = false;
+ $cnt = preg_match('|\[attach\]href=\"(.+?)\" size=\"(.+?)\" type=\"(.+?)\" title=\"(.+?)\"\[\/attach\]|',$r,$matches);
+ if($cnt) {
+ $msg .= $matches[1];
+ }
+ }
+ }
+
if (strlen($msg) > FACEBOOK_MAXPOSTLEN) {
$shortlink = "";
require_once('library/slinky.php');