Beispiel #1
0
function add_page_info($url, $no_photos = false, $photo = "", $keywords = false, $keyword_blacklist = "")
{
    $data = query_page_info($url, $no_photos, $photo, $keywords, $keyword_blacklist);
    $text = add_page_info_data($data);
    return $text;
}
Beispiel #2
0
function ifttt_message($uid, $item)
{
    $a = get_app();
    $_SESSION["authenticated"] = true;
    $_SESSION["uid"] = $uid;
    unset($_REQUEST);
    $_REQUEST["type"] = "wall";
    $_REQUEST["api_source"] = true;
    $_REQUEST["profile_uid"] = $uid;
    $_REQUEST["source"] = "IFTTT";
    $_REQUEST["title"] = "";
    $_REQUEST["body"] = $item["msg"];
    //$_REQUEST["date"] = $item["date"];
    //$_REQUEST["uri"] = $item["url"];
    if (strstr($item["url"], "facebook.com")) {
        $_REQUEST["extid"] = NETWORK_FACEBOOK;
    }
    if ($item["type"] == "link") {
        $data = query_page_info($item["link"]);
        if (isset($item["title"]) and trim($item["title"]) != "") {
            $data["title"] = $item["title"];
        }
        if (isset($item["description"]) and trim($item["description"]) != "") {
            $data["text"] = $item["description"];
        }
        $_REQUEST["body"] .= add_page_info_data($data);
    } elseif ($item["type"] == "photo" and $item["image"] != "") {
        $_REQUEST["body"] .= "\n\n[img]" . $item["image"] . "[/img]\n";
    }
    //print_r($_REQUEST);
    item_post($a);
}