yii2mod / yii2-feed
Social feeds
Installs: 205
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 4
Forks: 3
Open Issues: 0
Type:yii2-extension
Requires
- nojimage/twitter-text-php: dev-master
- simplepie/simplepie: dev-master
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-11-06 16:32:12 UTC
README
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist yii2mod/yii2-feed "*"
or add
"yii2mod/yii2-feed": "*"
to the require section of your composer.json.
Configuration
//set keys at the beginning of config \Yii::$container->set('yii2mod\feed\Twitter', [ 'token' => '', 'tokenSecret' => '', 'consumerKey' => '', 'consumerSecret' => '', ]);
Usage
<?php echo yii2mod\feed\Twitter::widget([ 'screenName' => 'disem', 'postsCount' => 3 ]); ?>
RSS
Allows to display multiple rss feeds as one
Usage
<?php echo yii2mod\feed\Rss::widget(['to' => 3, 'feeds' => [ 'http://somerss.com/rss.xml', 'http://somerss.com/rss2.xml', ]]); ?>