]> git.mxchange.org Git - friendica-addons.git/blobdiff - wppost/wppost.php
Twitter: The sync process is split into several short processes
[friendica-addons.git] / wppost / wppost.php
index 5e197ab65c96b9f00a75597fdea4f348bd9976ef..fc3d3a10acccd1058099181e7619956834426e4b 100755 (executable)
@@ -219,9 +219,10 @@ function wppost_send(&$a,&$b) {
 
                // If the title is empty then try to guess
                if ($wptitle == '') {
-                       // Take the description from the bookmark
-                       if(preg_match("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/is",$b['body'],$matches))
-                               $wptitle = $matches[2];
+                       // Fetch information about the post
+                       $siteinfo = get_attached_data($b["body"]);
+                       if (isset($siteinfo["title"]))
+                               $wptitle = $siteinfo["title"];
 
                        // If no bookmark is found then take the first line
                        if ($wptitle == '') {