oefenweb/cakephp-social-media
最新稳定版本:v3.0.1
Composer 安装命令:
composer require oefenweb/cakephp-social-media
包简介
A minimalistic SocialMedia Plugin for CakePHP
关键字:
README 文档
README
The SocialMedia plugin provides the tools to generate social media links (Helper) and handle them (Controller).
Requirements
- CakePHP 2.9.0 or greater.
- PHP 7.0.0 or greater.
Installation
- Clone/Copy the files in this directory into
app/Plugin/SocialMedia
Configuration
- Ensure the plugin is loaded in
app/Config/bootstrap.phpby calling:
CakePlugin::load('SocialMedia');
- Ensure to configure the following two lines in
app/Config/bootstrap.php:
Configure::write('SocialMedia.salt', 'your-salt');
Configure::write('SocialMedia.facebookAppId', 'your-facebook-app-id');
Usage
Facebook share link
echo $this->SocialMedia->facebook(
__('Share on Facebook'), [
'link' => 'your-url',
'name' => 'your-name',
'caption' => 'your-caption',
'description' => 'your-description',
'picture' => 'your-picture'
]
);
Twitter tweet link
echo $this->SocialMedia->twitter(
__('Tweet on Twitter'), [
'url' => 'your-url',
'via' => 'your-via',
'text' => 'your-text',
]
);
统计信息
- 总下载量: 27.6k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-06-01