$s .= '<div id="ifttt-configuration-wrapper">';
$s .= '<p>'.t("Create an account at <a href='http://www.ifttt.com'>IFTTT</a>. Create three Facebook recipes that are connected with <a href='https://ifttt.com/maker'>Maker</a> (In the form 'if Facebook then Maker') with the following parameters:").'</p>';
$s .= '<h4>URL</h4>';
- $s .= '<p>'.$a->get_baseurl()."/ifttt/".'</p>';
+ $s .= '<p>' . $a->get_baseurl() . '/ifttt/' . $a->user['nickname'] . '</p>';
$s .= '<h4>Method</h4>';
$s .= '<p>POST</p>';
$s .= '<h4>Content Type</h4>';
if (isset($_REQUEST["url"]))
$item["url"] = trim($_REQUEST["url"]);
- if ((substr($item["msg"], 0, 3) == "<<<") AND (substr($item["msg"], -3, 3) == ">>>"))
+ if ((substr($item["msg"], 0, 3) == "<<<") && (substr($item["msg"], -3, 3) == ">>>"))
$item["msg"] = substr($item["msg"], 3, -3);
ifttt_message($uid, $item);
//$_REQUEST["date"] = $item["date"];
//$_REQUEST["uri"] = $item["url"];
- if (strstr($item["url"], "facebook.com"))
+ if (strstr($item["url"], "facebook.com")) {
+ $hash = hash("ripemd128", item["url"]);
$_REQUEST["extid"] = NETWORK_FACEBOOK;
+ $_REQUEST['message_id'] = item_new_uri($a->get_hostname(), $uid, NETWORK_FACEBOOK.":".$hash);
+ }
if ($item["type"] == "link") {
$data = query_page_info($item["link"]);
- if (isset($item["title"]) AND (trim($item["title"]) != ""))
+ if (isset($item["title"]) && (trim($item["title"]) != ""))
$data["title"] = $item["title"];
- if (isset($item["description"]) AND (trim($item["description"]) != ""))
+ if (isset($item["description"]) && (trim($item["description"]) != ""))
$data["text"] = $item["description"];
$_REQUEST["body"] .= add_page_info_data($data);
- } elseif (($item["type"] == "photo") AND ($item["image"] != ""))
+ } elseif (($item["type"] == "photo") && ($item["image"] != ""))
$_REQUEST["body"] .= "\n\n[img]".$item["image"]."[/img]\n";
//print_r($_REQUEST);
item_post($a);
}
-?>