jakubenglicky/social-plugins

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (v1.0.2) of this package.

Wrapper around social plugins.

v1.0.2 2017-09-02 19:31 UTC

This package is auto-updated.

Last update: 2023-12-27 00:46:50 UTC


README

Latest version Downloads this Month Build

This is the simple wrapper around implementing social plugins to your websites.

More info (Facebook) -> https://developers.facebook.com/

More info (Twitter) -> https://dev.twitter.com/

Instalation

composer require jakubenglicky/social-plugins

Usage

Facebook

$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

$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

$hub = new jakubenglicky\SocialPlugins\Hub();

$hub->fb; //instance of jakubenglicky\SocialPlugins\Facebook()
$hub->tw; //instance of jakubenglicky\SocialPlugins\Twitter()