public static function sendLink($link, $message = '')
    {
        self::initialize();
        $data = compact('link', 'message');
        try {
            $response = self::$fb->post('/me/feed', $data, self::$page_access_token);
        } catch(Facebook\Exceptions\FacebookResponseException $e) {
            throw new \Exception('Graph returned an error: '.$e->getMessage());
        } catch(Facebook\Exceptions\FacebookSDKException $e) {
            throw new \Exception('Facebook SDK returned an error: '.$e->getMessage());
        }
        $graphNode = $response->getGraphNode();

        return $graphNode['id'];
    }
public static function sendLink($link, $message = '')
    {
        self::initialize();
        $data = compact('link', 'message');
        try {
            $response = self::$fb->post('/me/feed', $data, self::$page_access_token);
        } catch(Facebook\Exceptions\FacebookResponseException $e) {
            throw new \Exception('Graph returned an error: '.$e->getMessage());
        } catch(Facebook\Exceptions\FacebookSDKException $e) {
            throw new \Exception('Facebook SDK returned an error: '.$e->getMessage());
        }
        $graphNode = $response->getGraphNode();

        return $graphNode['id'];
    }
public static function sendLink ( $ link , $ message = '' ) { self :: initialize ( ) ; $ data = compact ( 'link' , 'message' ) ; try { $ response = self :: $ fb -> post ( '/me/feed' , $ data , self :: $ page_access_token ) ; } catch ( Facebook \ Exceptions \ FacebookResponseException $ e ) { throw new \ Exception ( 'Graph returned an error: ' . $ e -> getMessage ( ) ) ; } catch ( Facebook \ Exceptions \ FacebookSDKException $ e ) { throw new \ Exception ( 'Facebook SDK returned an error: ' . $ e -> getMessage ( ) ) ; } $ graphNode = $ response -> getGraphNode ( ) ; return $ graphNode [ 'id' ] ; }
Send link and text message

@param $link
@param $message
@return bool
@throws \Exception
Send link and text message