dededey
4/28/2015 - 2:52 PM

socials share in functions

socials share in functions


// facebook share
function fbShare($url,$picture = 'http://www.sito.com/wp-content/uploads/foto-default.jpg' , $title = 'sito.com', $desc = 'descritpion'){
    // return "https://www.facebook.com/dialog/share?app_id=422399111266789&display=popup&href=".$url."&redirect_uri=".$url;
    return "https://www.facebook.com/dialog/feed?app_id=422399111266789&link=".$url."&picture=".$picture."&name=".$title."&description=".$desc."&redirect_uri=http://www.thewinterview.com";
}


// twitter share
function twitterShare($url,$frase = NULL){
    return 'https://twitter.com/share?url='.$url.'&text='.$frase;
}

// pinterest share
function pinterestShare($url,$img_url,$description){
    $encoded_desc = urlencode($description);
    return 'http://pinterest.com/pin/create/button/?url='.$url.'&media='.$img_url.'&description='.$encoded_desc.'" class="pin-it-button" count-layout="horizontal"';
}