public static function generate($network, Content $page)
    {
        // Get text
        $text = self::truncate($page->description, 137);

        // Replace template with values
        return str_replace([
            '{url}',
            '{title}',
            '{text}',
            '{image}'
        ], [
            urlencode($page->url),
            urlencode($page->title),
            urlencode($text),
            urlencode($page->get('image'))
        ], self::$templates[$network]);
    }
public static function generate($network, Content $page)
    {
        // Get text
        $text = self::truncate($page->description, 137);

        // Replace template with values
        return str_replace([
            '{url}',
            '{title}',
            '{text}',
            '{image}'
        ], [
            urlencode($page->url),
            urlencode($page->title),
            urlencode($text),
            urlencode($page->get('image'))
        ], self::$templates[$network]);
    }
public static function generate ( $ network , Content $ page ) { // Get text $ text = self :: truncate ( $ page -> description , 137 ) ; // Replace template with values return str_replace ( [ '{url}' , '{title}' , '{text}' , '{image}' ] , [ urlencode ( $ page -> url ) , urlencode ( $ page -> title ) , urlencode ( $ text ) , urlencode ( $ page -> get ( 'image' ) ) ] , self :: $ templates [ $ network ] ) ; }
Generate social network link.

@param  string  $network
@param  Content $page
@return string
Generate social network link .