Facebook PHP SDK v3.0.0 with CodeIgniter v2.0.2 - How to integrate? |
[eluser]Unknown[/eluser]
Facebook have released v3.0.0 of their PHP SDK... Does anyone have some tips on how to integrate this into CodeIgniter v2.0.2? I'm rather new to CI - so step-by-step tips would be great (for me and others I'm sure). Would prefer to keep it simple - and not use some special third-party library - just keep to the core Facebook library. Quote:The new PHP SDK (v3.0.0) is a major upgrade to the older one (v2.2.x): Facebook Dev Blog: Upgrade to PHP SDK v3.0.0 http://developers.facebook.com/blog/post/503 GitHub Source https://github.com/facebook/php-sdk/ FYI I'm going to start by looking over these for some tips: http://www.key2market.com/2010/12/integr...niter-2-0/ http://www.haughin.com/code/facebook/ http://brandonbeasley.com/blog/facebook-...deigniter/ Thanks in advance for any help you have to offer ^_^
[eluser]Calebe Aires[/eluser]
Try this, the best I have found! https://bitbucket.org/deth4uall/facebook-ignited/
[eluser]Unknown[/eluser]
Thanks Calebe, It looks like that project has some interesting code for handling request id's.... which co-indecently is something I'm working on today (great timing!). I seems the demo url isn't totally working as expected http://apps.facebook.com/facebook-ignited/ 1st it redirected to the developers url (after FB permissions) and not back to the Facebook app canvas url. Also the "Try a request" and "Try publishing to your feed" links did not work for me... Could be because I am on Firebox 5 (beta) ... or that PHP SDK v3.0.0 is not compatible yet with JavaScript SDK logins.... have 4 weeks to wait!: http://developers.facebook.com/blog/post/503 For this reason I have stuck with v2.1.2 of the PHP SDK (for now). For integration I have done the following: 1. Renamed the SDK file "facebook.php" to "Facebook.php" 2. Added this to the top line of that file: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 4. Added my own "facebook.php" config file to /application/config/ (includes: app id, api key, secret key, canvas url, and several other useful urls ) 5. In /application/config/autoload.php I auto load the "facebook" config file Code: $autoload['config'] = array('facebook'); Code: $fb_config = array( FYI I'm not sure about assigning by reference on the line: Code: $data['facebook'] =& $this->facebook; P.S I have have a Controller named "site"; with the Views: index, canvas, tab, privacy, terms. And "no-view" controllers for: deauthorize ... and working on an "invite" controller for multi-friend-selector id capturing. For my app all the action takes place in the /site/tab/ controller since my app is to be used as a tab on Facebook Pages. I'm using the JavaScript SDK to parse XFBML and subscribe to "like"/"un-like" events for the page.
[eluser]Unknown[/eluser]
hi chrisjacob i interest with your tutorial, step by step, but would you like to exlain it more detail like when you create your own config file what it's look like, and more detail step. and what about the base_facebook.php that already came from facebook-php-sdk?where did you put it on? thank you
[eluser]Nisha S.[/eluser]
May be you can refer my blog entry on http://www.betterhelpworld.com/codeignit...odeigniter.
[eluser]geotravel[/eluser]
[quote author="Nisha S." date="1308159424"]May be you can refer my blog entry on http://www.betterhelpworld.com/codeignit...odeigniter.[/quote] It will be useful to others users API REST https://github.com/philsturgeon/codeigniter-restserver add doc how to integrate this wit API REST or maybe you can add this code to API REST ?
[eluser]deth4uall[/eluser]
Only downside for using the REST API is that in several months time it will be cycled out and we will be resorting to use Graph API whether it is fully completed or not.
[eluser]Unknown[/eluser]
Please go through this url: http://www.idiotminds.com/login-with-fac...deigniter/ |
Welcome Guest, Not a member yet? Register Sign In |