Welcome Guest, Not a member yet? Register   Sign In
Facebook PHP SDK for CodeIgniterFacebook PHP SDK v4 CodeIgniter
#1

(This post was last modified: 05-23-2016, 04:31 AM by silentium.)

There has been a few questions lately here in the forums on how to use the Facebook PHP SDK with CodeIgniter. So I decided to release the library I coded and have used in a few of my projects.

I have just updated the library so that it support all 3 types of log in methods, Redirect, Javascript and Canvas. It include some basic functionality like checking if a user is logged in as well as publish text, image or video to a users wall methods.

I hope that my library comes to good for some and/or guides others to get on the right path to build there own versions.

You can find it in my Github: https://github.com/darkwhispering/facebo...odeigniter

Any contributions and feedback are welcomed. However, please read the contributing rules before submitting any pull requests.

[UPDATE JUNE 2015]: New version (beta) available with support for Facebook PHP SDK v5. - https://github.com/darkwhispering/facebo...v5-develop
[UPDATE MAY 2016]: V3.0.0 is finally out of beta and available at https://github.com/darkwhispering/facebo...odeigniter
Reply
#2

(This post was last modified: 04-16-2015, 01:38 AM by alkarim.)

great one....i was looking for this a long way back...any way nice work.
Reply
#3

(04-16-2015, 01:38 AM)alkarim Wrote: great one....i was looking for this a long way back...any way nice work.

Thanks. Glad you found it useful.
Reply
#4

@silentium

I am curious about the combination CodeIgniter - HybridAuth - Facebook PHP SDK v4.
Is it possible such an implementation?
Reply
#5

can you show the routes file? i have an error in redirecting /example/web_login it says not found.

in my routes i added this lines

$route['default_controller'] = 'example';
$route['example/web_login'] = "example/web_login";
Reply
#6

The library is working fine except I am only getting user ID and Name (full name). I need the email badly. Did I miss something?

Thank you.
Reply
#7

Sorry for absence in responding to comments here, been a busy summer.

I have finally got to it and updated the library to support the latest version of the Facebook PHP SDK v5. The Facebook SDK changed a lot so I have had to rewrite the plugin from scratch.

So first beta version (v3.0.0-beta1) is available now for anyone that would like to test it. https://github.com/darkwhispering/facebo...v5-develop

Please report any issues you find in the issue tracker at Github, not here. https://github.com/darkwhispering/facebo...ter/issues

(08-27-2015, 12:29 AM)enajennairam Wrote: The library is working fine except I am only getting user ID and Name (full name). I need the email badly. Did I miss something?

Thank you.

The email is a bug/issue in the current version that is fixed v3.0.0-beta1. Also, see this thread for more information: https://github.com/darkwhispering/facebo...r/issues/5

(04-17-2015, 04:51 PM)ivantcholakov Wrote: @silentium

I am curious about the combination CodeIgniter - HybridAuth - Facebook PHP SDK v4.
Is it possible such an implementation?

I don't know about that combination specifically. I have personally use the combination of CodeIgniter + IonAuth + Facebook PHP SDK v4 before without issues.

(05-07-2015, 01:55 AM)cristiana214 Wrote: can you show the routes file? i have an error in redirecting /example/web_login it says not found.

in my routes i added this lines

$route['default_controller'] = 'example';
$route['example/web_login'] = "example/web_login";

I rarely use the routes files, and you don't need to for this library unless you have configured you setup such that you do manual routing.
And I can't see anything wrong with your above example.
Reply
#8

The long awaited v3.0.0 of my Facebook library for CodeIgniter 3 that include support for Facebook PHP SDK v5 and above is finally release after a long time in the develop branch.

The update also include new methods for batch requests and upload of images and video to a users profile.

Changelog:
  • NEW: New config setting facebook_auth_on_load to control on page load authorization (try to get valid access token). On as default for backward compatibility.
  • NEW: New way of checking if access token in session is still valid. Should be more reliable now.
  • NEW: New user_upload_request() method. Supports upload of images and video to a users profile.
  • NEW: New add_to_batch_pool() method. Add multiple Graph request to the pool and send all in one go later.
  • NEW: New remove_from_batch_pool() method. Remove a graph request from the batch pool.
  • NEW: New send_batch_pool() method. Send all Graph request in the pool.
  • UPDATE: Default graph version in config now v2.6
  • UPDATE: Cleanup of the code
  • CHANGE: Page load authorization (try to get valid access token) made optional but on as default. Control with new config settings.

Read more on Github, https://github.com/darkwhispering/facebo...odeigniter
Reply
#9

why when i try to login with facebook first time, the data can be shown. and when i try to refresh page again and again, the data from facebook can't be shown, i try to connect again, the data can't be shown too.
it possible to have a problem with the session ?

http://prntscr.com/bmx7pj
Reply
#10

Could you give an example on how to implement your v3 with ion-auth?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB