jakubenglicky/social-plugins

此包已被废弃,不再维护。没有建议的替代包。
此包的最新版本(v1.0.2)没有可用的许可证信息。

社交插件包装器。

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

这是一个简单的社交插件实现包装器。

更多信息(Facebook)-> https://developers.facebook.com/

更多信息(Twitter)-> https://dev.twitter.com/

安装

composer require jakubenglicky/social-plugins

使用方法

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('https://#/zuck');
echo $fb->renderPagePlugin('https://#/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');

你可以全部使用

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

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