PHPackages                             codesleeve/social - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. codesleeve/social

AbandonedLibrary[Authentication &amp; Authorization](/categories/authentication)

codesleeve/social
=================

A simple way to integrate oauth and social sites like facebook, twitter and google into your Laravel 4 application.

842.2k13[7 issues](https://github.com/CodeSleeve/social/issues)[1 PRs](https://github.com/CodeSleeve/social/pulls)PHP

Since Jul 1Pushed 12y ago8 watchersCompare

[ Source](https://github.com/CodeSleeve/social)[ Packagist](https://packagist.org/packages/codesleeve/social)[ RSS](/packages/codesleeve-social/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

What the heck is this Social package?
-------------------------------------

[](#what-the-heck-is-this-social-package)

We've stopped working on this thing.
------------------------------------

[](#weve-stopped-working-on-this-thing)

Unforunately the underlying package `lusitanian/oauth` has a few issues. We've upgraded to the latest version but there may be issues. :( We don't have time to really put in the work to make this package **production** worthy, so please use at your own risk.

If you'd like to contribute, please put in a pull request.

You can add new providers in pull requests if you'd like. Just browse around the code some.

Goal
----

[](#goal)

This package's goal is to quickly integrate oauth and social media sites like facebook, twitter and google into your laravel 4 application.

We do this with a preconfigured setup of oauth plugins that piggybacks off of the very popular lusitanian/phpoauthlib. The project uses a facade for oauth and api's to the most popular social websites (facebook, twitter, google, etc) and within minutes after installing this package to have oauth integrated.

Installation
------------

[](#installation)

Begin by installing this package through Composer. Edit your project's `composer.json` file to require `codesleeve/social`.

It might look something like:

```
  "require": {
    "laravel/framework": "4.0.*",
  	"codesleeve/social": "dev-master"
  }
```

Next, update Composer from the Terminal:

```
    composer update
```

Once this operation completes add the service provider. Open `app/config/app.php`, and add a new item to the providers array.

```
    'Codesleeve\Social\SocialServiceProvider'
```

And put in the `Social` facade under the `aliases` array in `app/config/app.php`.

```
     'Social' => 'Codesleeve\Social\Social',
```

Lastly generate a package config that you can work with.

```
  php artisan config:publish codesleeve/social
```

Usage
-----

[](#usage)

First you will need to configure the plugin. Let's walk through how to do it for facebook. You can see a complete list of other social sites below.

Next go edit the file at `app/config/packages/codesleeve/social/config.php`, here is a example for facebook,

```
  'facebook' => array(
  	'key' => '',
  	'secret' => '',
  	'scopes' => array('email'),
  	'redirect_url' => '/',
  ),
```

You will need to add at least a `key` and `secret` which can be obtained by [creating a new facebok app](https://developers.facebook.com/apps "Create an app on facebook developers site")

After the user logs in, if you want to redirect them somewhere besides the base path of your laravel application, then you can change the `redirect_url`.

Once you have configured facebook application open up a view and place

```
