2017 © Pedro Peláez
 

symfony-bundle twitter-bundle

Symfony TwitterBundle

image

ss/twitter-bundle

Symfony TwitterBundle

  • Friday, January 29, 2016
  • by SalemSaiid
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*1)


$ composer require ss/twitter-bundle "*@dev" -dev

This command requires you to have Composer installed globally, as explained in the installation chapter_ of the Composer documentation., (*2)

Step 1: Enable the Bundle

Then, enable the bundle by adding the following line in the app/AppKernel.php file of your project:, (*3)

<?php
    // app/AppKernel.php
    class AppKernel extends Kernel
    {
        public function registerBundles()
        {
            $bundles = array(
                // ...
                new SS\TwitterBundle\SSTwitterBundle(),
            );
            // ...
        }
    }

Step 4: Configure your application's config.yml

Below is the configuration necessary to use the SSTwitterBundle in your application:, (*4)


# app/config/config.yml parameters: twitter_api.key: YOUR_CONSUMER_KEY twitter_api.key_secret: YOUR_CONSUMER_SECRET

Step 5: How to use :

You should call the ss_twitter_api service, this is an exemple on controller :, (*5)

<?php
    /**
     * @Route("/app/hometimeline", name="hometimeline")
     */
    public function indexAction()
    {
        $twitter = $this->get('ss_twitter_api');
        $twitter_object = $twitter->getUserTimeLine('salemsaiid',10);

        return $this->render('AppBundle:Default:index.html.twig', array(
            'twitter_object' => $twitter_object
        ));
    }

The Versions

29/01 2016

dev-master

9999999-dev

Symfony TwitterBundle

  Sources   Download

GPL-3.0+

The Requires

 

by Salem Said

api twitter application