2017 © Pedro Peláez
 

library twitter-bundle

Endroid Twitter Bundle for Symfony

image

ebeinarovic/twitter-bundle

Endroid Twitter Bundle for Symfony

  • Tuesday, August 27, 2013
  • by beinarovic
  • Repository
  • 1 Watchers
  • 0 Stars
  • 62 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Endroid Twitter Bundle

By endroid, (*1)

Build Status Latest Stable Version Total Downloads, (*2)

This bundle enables you to use Endroid Twitter as a service in your Symfony project. It also provides an API controller that takes a local API request, adds an OAuth signature to it and returns the corresponding Twitter API response. This enables you to expose the Twitter API on your own domain without having to bother about OAuth signing your requests., (*3)

For more information see the endroid/Twitter repository and the Twitter API., (*4)

knpbundles.com, (*5)

Requirements

Installation

Add in your composer.json

{
    "require": {
        "endroid/twitter-bundle": "dev-master"
    }
}

Install the bundle

``` bash $ curl -s http://getcomposer.org/installer | php $ php composer.phar update endroid/twitter-bundle, (*6)


Composer will install the bundle to your project's `vendor/endroid` directory. ### Enable the bundle via the kernel ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Endroid\Bundle\TwitterBundle\EndroidTwitterBundle(), ); }

Configuration

config.yml

endroid_twitter:
    consumer_key: "..."
    consumer_secret: "..."
    access_token: "..."
    access_token_secret: "..."

Routing

If you don't want to expose the Twitter API via your application, you can skip this section., (*7)

``` yml EndroidTwitterBundle: resource: "@EndroidTwitterBundle/Controller/" type: annotation prefix: /twitterapi, (*8)


This exposes the Twitter API via <yourdomain>/twitterapi. This means that instead of sending a signed request to https://dev.twitter.com/docs/api/1.1/* you can now send an unsigned request to <yourdomain>/twitterapi/*. Make sure you secure this area if you don't want others to be able to post on your behalf. ## Usage After installation and configuration, the service can be directly referenced from within your controllers. ```php <?php $twitter = $this->get('endroid.twitter'); // Retrieve the user's timeline $tweets = $twitter->getTimeline(array( 'count' => 5 )); // Or retrieve the timeline using the generic query method $response = $twitter->query('statuses/user_timeline', 'GET', 'json', $parameters); $tweets = json_decode($response->getContent());

License

This bundle is under the MIT license. For the full copyright and license information, please view the LICENSE file that was distributed with this source code., (*9)

The Versions

27/08 2013

dev-master

9999999-dev https://github.com/endroid/EndroidTwitterBundle

Endroid Twitter Bundle for Symfony

  Sources   Download

MIT

The Requires

 

bundle symfony twitter endroid 1.1

23/06 2013

1.1.1

1.1.1.0 https://github.com/endroid/EndroidTwitterBundle

Endroid Twitter Bundle for Symfony

  Sources   Download

MIT

The Requires

 

bundle symfony twitter endroid

06/12 2012

1.1.0

1.1.0.0 https://github.com/endroid/EndroidTwitterBundle

Endroid Twitter Bundle for Symfony

  Sources   Download

MIT

The Requires

 

bundle symfony twitter endroid

01/12 2012

1.0.0

1.0.0.0 https://github.com/endroid/EndroidTwitterBundle

Endroid Twitter Bundle for Symfony

  Sources   Download

MIT

The Requires

 

bundle symfony twitter endroid