public function setFacebook($value)
    {
        $nickname = $url = '';
        if (strlen($value)) {
            if (strpos($value, 'http') !== false) {
                $url = $value;
                $nickname = substr($value, strrpos($value, '/') + 1);
            } else {
                $nickname = $value;
                $url = 'https://facebook.com/' . $value;
            }
        }
        update_user_meta($this->ID, User::KEY_FACEBOOK, $nickname);
        update_user_meta($this->ID, User::KEY_FACEBOOK_URL, $url);
    }
public function setFacebook($value)
    {
        $nickname = $url = '';
        if (strlen($value)) {
            if (strpos($value, 'http') !== false) {
                $url = $value;
                $nickname = substr($value, strrpos($value, '/') + 1);
            } else {
                $nickname = $value;
                $url = 'https://facebook.com/' . $value;
            }
        }
        update_user_meta($this->ID, User::KEY_FACEBOOK, $nickname);
        update_user_meta($this->ID, User::KEY_FACEBOOK_URL, $url);
    }
public function setFacebook ( $ value ) { $ nickname = $ url = '' ; if ( strlen ( $ value ) ) { if ( strpos ( $ value , 'http' ) !== false ) { $ url = $ value ; $ nickname = substr ( $ value , strrpos ( $ value , '/' ) + 1 ) ; } else { $ nickname = $ value ; $ url = 'https://facebook.com/' . $ value ; } } update_user_meta ( $ this -> ID , User :: KEY_FACEBOOK , $ nickname ) ; update_user_meta ( $ this -> ID , User :: KEY_FACEBOOK_URL , $ url ) ; }
Set new Facebook

@param string $value Can be the nickname or the absolute url
Set new Facebook