Giter VIP home page Giter VIP logo

facebook-starter-kit-for-codeigniter's Introduction

# Open Source Codeigniter Authentication.

A complete web sample and template of a secure authentication system using the Codeigniter PHP framework. Very simple configuration, as most of it has been done in this sample.


## Authored by: Nicholas Cerminara

## Demo available at http://stellarfrequency.com/

## Intro and Notes

This is a very simple starter-kit I wrote for Facebook Authentication and Codeigniter. Naturally, Facebook plays very nicely with the Codeigniter framework. This starter kit provides as an example for laying out your controlers and models logic. Enjoy! And all feedback is very welcome!


## Installation Instructions

###	Installing

1.	Unzip package
2.	Upload entire folders to server
3.	Create a database on your server, import stellarfrequency.sql (phpMyAdmin)
4.	Go to application/config/config.php
5.	Change $config['base_url'] to your base URL
6.	Change $config['encryption_key'] to a completely random character string
7.	Go to application/config/database.php and connect to your database
8.  Go to developers.facebook.com and create a Facebook Application (make sure you specify App Domain and Website)
9.  Go to application/config/Facebook.php and put in your APP_SECRET and APP_ID
10. Go to application.com/config/Stellar.php and enter your Facebook Permissions (https://developers.facebook.com/docs/authentication/permissions/)

##	Documentation

Very quickly, you'll notice your models, controllers, libraries, and config folder to have custom scripts. This works the Facebook SDK with codeigniter smoothly.

Normally, you call the facebook API by creating an object and doing $facebook->"function". However, this requires one extra step of $this->facebook->"function". The Facebook library is autoloaded by the Codeigniter framework in this installation.

You'll notice I tied the Facebook libary to the model just for the sake of keeping straight forward MVC convention. This build only implements the PHP SDK.

There are example functions in the Model to demonstrate some good practice for using cURL to call to the Facebook Graph API. The way the functions are setup are meant to provide error handling and return any JSON error information you would like to do additional logging or error handling.

Please feel free to contact me with suggestions, improvements, or questions! Thanks guys, I hope this helps at least one person out there!

facebook-starter-kit-for-codeigniter's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.