Reputation: 2924
I am doing FaceBook integration of my codeigniter based web application, I want to avail the facility of a user being able to log into my site using his Facebook login Id and pass.
The easiest method as mentioned here is http://developers.facebook.com/docs/concepts/login/login-architecture/ is by using Client side JavaScript SDK.(Correct me if I am wrong, I also would love to follow if possible even more easier methods.)
But I am little confused as there are PHP sdk's also available and I have heard that the PHP sdk is the only way one can authenticate certain parts of Facebook and it is the only way we can access Facebook data through FQL.
Which way to go?
Any help will be highly appreciated.
Upvotes: 0
Views: 1174
Reputation: 11852
Which way you authenticate depends upon what you are doing.
If you are interacting with a user on Facebook, all logins are done client-side. You can call this yourself using the Login Dialog or the Javascript SDK.
For the easiest method, if you have the PHP SDK installed, you can use the getLoginUrl method to generate a link to the Login Dialog automatically.
Once you have authenticated your user, you can interact with their data using FQL or Graph API calls with that same access token.
If you want a long-lived access token, you can only request that server-side if you currently have a valid user access token you've acquired through a client side method.
If you want to authenticate as an app or page to access insights data or configuration parameters, then yes, you may need a server-side access flow.
Upvotes: 1