SocialPlugins
, (*1)
This is the simple wrapper around implementing social plugins to your websites., (*2)
More info (Facebook) -> https://developers.facebook.com/, (*3)
More info (Twitter) -> https://dev.twitter.com/, (*4)
Instalation
composer require jakubenglicky/social-plugins
Usage
Facebook, (*5)
$fb = new jakubenglicky\SocialPlugins\Facebook();
// Render after body opening tag <body>
echo $fb->renderInit();
echo $fb->renderComments();
echo $fb->renderLikeButton();
echo $fb->renderShareButton();
echo $fb->renderFollowButton('http://www.facebook.com/zuck');
echo $fb->renderPagePlugin('https://www.facebook.com/FacebookforDevelopers');
Twitter, (*6)
$tw = new jakubenglicky\SocialPlugins\Twitter();
// Render link to twitter.js file
echo $tw->renderJs();
echo $tw->renderTweetButton();
echo $tw->renderFollowButton('https://twitter.com/kubaenglicky');
You can use all in one, (*7)
$hub = new jakubenglicky\SocialPlugins\Hub();
$hub->fb; //instance of jakubenglicky\SocialPlugins\Facebook()
$hub->tw; //instance of jakubenglicky\SocialPlugins\Twitter()