public function extractHashtags($str, $type = 'arr')
    {
        preg_match_all("/(#\w+)/", $str, $matches);
        $matches = $type == 'arr' ? $matches[0] : implode(', ', $matches[0]);
        return $matches;
    }