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

dev-master 2016-05-20 16:52 UTC

This package is not auto-updated.

Last update: 2024-11-20 16:55:17 UTC


README

Latest Stable Version Total Downloads License

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.

Twitter

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',
]]); ?>