gobline/logwriter-twitter
Composer 安装命令:
composer require gobline/logwriter-twitter
包简介
Twitter Log Writer component
README 文档
README
Gobline\Logger\Writer\TwitterLogWriter tweets log information (as private DM (direct messages)).
With the Twitter app installed, you have instant notifications on your mobile.
If your mobile carrier is supported, you can also activate SMS notfications.
Usage
- Create a new Twitter user for your web application and a Twitter App.
- Select the new App and change permissions to Read and Write.
- Generate consumer key, consumer secret, access token and access token secret (make sure you (re)generate after you have set the permissions).
$logger = new Gobline\Logger\Writer\TwitterLogWriter( $oAuthAccessToken, // your genenated access token $oAuthAccessTokenSecret, // your genenated access token secret $consumerKey, // your genenated consumer key $consumerKeySecret, // your genenated consumer key secret $receiverScreenName // the user account display name of the receiver ); $logger->info('hello world');
Note that
- you need two Twitter accounts for this to work: the twitter account sending the direct message, and the twitter account receiving it.
- the receiver account needs to follow the sender.
- Twitter will block consecutive duplicated messages.
Installation
You can install the Twitter Log Writer using the dependency management tool Composer. Run the require command to resolve and download the dependencies:
composer require gobline/logwriter-twitter
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-12-03