OAuthBundle
OAuthBundle for Symfony2 that uses Twitter and Facebook
Installation
Add my fork of twitteroauth, the facebook php sdk and the OAuthBundle as submodule
git submodule add git://github.com/ruudk/twitteroauth.git vendor/twitteroauth git submodule add git://github.com/facebook/facebook-php-sdk.git vendor/facebook-php-sdk git submodule add git://github.com/oneplusone/OAuthBundle.git vendor/bundles/OnePlusOne/Bundle/OAuthBundleAdd this bundle to your application's kernel:
// application/AppKernel.php public function registerBundles() { return array( // ... new OnePlusOne\Bundle\OAuthBundle\OnePlusOneOAuthBundle(), // ... ); }Add OnePlusOne and TwitterOAuth to the autoloader
$loader->registerNamespaces(array( // ... 'OnePlusOne' => __DIR__.'/../vendor/bundles/OnePlusOne/Bundle/OAuthBundle', 'TwitterOAuth' => __DIR__.'/../vendor/twitteroauth', ));Configure the
oauthservice in your config:# application/config/config.yml one_plus_one_o_auth: facebook: appId: 123 secret: abc req_perms: 'publish_stream' #optional twitter: key: 123 secret: abcCheck if the PHP template engine is enabled
# application/config/config.yml app.config: // ... templating: { engines: ['php', 'twig'] }Load the routings in your routing.yml:
OAuthBundle: resource: OAuthBundle/Resources/config/routing.yml
Usage
Go to http://localhost/login and choose your service and connect!
Enjoy
- Ruud
Copyright (c) 2010 Ruud Kamphuis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
oneplusone_oauth:
facebook:
appId: ~
secret: ~
req_perms: ~
twitter:
key: ~
secret: ~
github:
id: ~
secret: ~
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
-
Merge branch 'master' of git://github.com/oneplusone/OAuthBundle
By ruudk, 8 months ago
