src/Social/Facebook.php
public function createShareLink($url = '', $caption = '')
    {
        if (empty($caption) && !empty($this->redirectUrl)) {
            $parseUrl = parse_url($this->redirectUrl);
            $caption  = $parseUrl['host'];
        }
        $params     = array(
            'app_id'       => $this->appId,
            'caption'      => $caption,
            'href'         => $url . '?utm_source=facebook&utm_medium=link_share&utm_campaign=facebook_share',
            'redirect_uri' => $this->redirectUrl . '?utm_source=facebook&utm_medium=link_call_back&utm_campaign=facebook_share'
        );
        $this->link = self::SHARE_URI . '?' . http_build_query($params);

        return $this;
    }
public function createShareLink($url = '', $caption = '')
    {
        if (empty($caption) && !empty($this->redirectUrl)) {
            $parseUrl = parse_url($this->redirectUrl);
            $caption  = $parseUrl['host'];
        }
        $params     = array(
            'app_id'       => $this->appId,
            'caption'      => $caption,
            'href'         => $url . '?utm_source=facebook&utm_medium=link_share&utm_campaign=facebook_share',
            'redirect_uri' => $this->redirectUrl . '?utm_source=facebook&utm_medium=link_call_back&utm_campaign=facebook_share'
        );
        $this->link = self::SHARE_URI . '?' . http_build_query($params);

        return $this;
    }
Function createShareLink

@author: 713uk13m <dev@nguyenanhung.com>
@time  : 11/6/18 14:58

@param string $url
@param string $caption

@return $this