2017 © Pedro Peláez
 

library twitter-component

Nette Framework Control for rendering tweets.

image

flame/twitter-component

Nette Framework Control for rendering tweets.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

TwitterControl for Nette Framework Build Status

About

TwitterControl is a simple but very powerful visual component for Nette Framework for displaying tweets on your site., (*1)

Installation

Preferred way of installation is using Composer. Add the following dependency to your composer.json file and you're ready to go., (*2)

{
    "require": {
        "flame/twitter-component": "dev-master"
    }
}

Usage

In the config.neon

common:
    parameters:
        twitter:
            screenName: JSifalda
            tweetCount: 10

            ...


services:
    Cache: Nette\Caching\Cache
    TwitterLoader: \Flame\Components\Twitter\TwitterLoader
        TwitterControlFactory:
            class: Flame\Components\Twitter\TwitterControlFactory
            setup:
                - setConfig(%twitter%)

 In presenter:

<?php
    /**
     * @var \Flame\Components\Twitter\TwitterControlFactory $twitterControlFactory
     */
    private $twitterControlFactory;

    /**
     * @param \Flame\Components\Twitter\TwitterControlFactory $twitterControlFactory
     */
    public function injectTwitterControlFactory(\Flame\Components\Twitter\TwitterControlFactory $twitterControlFactory)
    {
        $this->twitterControlFactory = $twitterControlFactory;
    }

    /**
     * @return \Flame\Components\Twitter\TwitterControl
     */
    protected function createComponentTwitter()
    {
        return $this->twitterControlFactory->create();
    }

In template

{control twitter}

Available config options

screenName  Twitter screen name (either screenName or userId is required)
userId      Twitter user ID (takes precedence over screenName, if both specified)
tweetCount      Number of tweets to load (max. 200)
retweets    Include retweets
replies     Include replies

The Versions

04/11 2012

dev-master

9999999-dev https://github.com/flame-org/Twitter-Component

Nette Framework Control for rendering tweets.

  Sources   Download

MIT

The Requires

 

The Development Requires

component twitter nette twitter-component