for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @link https://github.com/yiimaker/yii2-social-share
* @copyright Copyright (c) 2017 Yii Maker
* @license BSD 3-Clause License
*/
namespace ymaker\social\share\drivers;
use ymaker\social\share\base\DriverAbstract;
* DriverAbstract for Facebook.
* @link https://facebook.com
*
* @author Vladimir Kuprienko <[email protected]>
* @since 1.0
class Facebook extends DriverAbstract
{
* @inheritdoc
protected function processShareData()
$this->url = static::encodeData($this->url);
}
protected function buildLink()
return 'http://www.facebook.com/sharer.php?u={url}';
* @return array
protected function getMetaTags()
return [
['property' => 'og:url', 'content' => '{url}'],
['property' => 'og:type', 'content' => 'website'],
['property' => 'og:title', 'content' => '{title}'],
['property' => 'og:description', 'content' => '{description}'],
['property' => 'og:image', 'content' => '{imageUrl}'],
];