I am somewhat confused by the facebook developers guide. Some tutorials show the javascript SDK being used while some show the PHP SDK being used. Do I need to load both of these? Are there any differences between the two (besides one being client and one being server)?
I am wanting to use Facebook's SDK for User Authentication, Social Plugins, and the Graph API.
The Facebook SDK for JavaScript provides a rich set of client-side functionality that: Enables you to use the Like Button and other Social Plugins on your site. Enables you to use Facebook Login to lower the barrier for people to sign up on your site. Makes it easy to call into Facebook's Graph API.
The Facebook SDK is a set of software components that developers can include in their mobile app to understand how people use the app, run optimized marketing campaigns and enable Facebook login and social sharing.
The best advice I can give you - be very careful when planning a new development on the Facebook Platform. A lot of the documentation is seriously out of date, and this is exacerbated by sporadic platform revisions.
Admittedly, this has improved in recent months, but I digress...
Facebook have recently deprecated the creation of FBML canvas applications, which means your application will have to be in an iframe. This also implies you could make the applications available off of Facebook too (e.g., http://apps.facebook.com/someapp/ and http://www.someapp.com/ can both load up). This narrows the benefits of using the PHP SDK, as a lot of the functionality is available via the JavaScript API.
For SDK authentication you should use the Javascript SDK. It's much easier to set up things properly.
For the Graph API, it depends what kind of application you are going to build. If you are storing or processing stuff on the server side then you will have to use the PHP SDK.
You don't need to use an SDK for their Social plugins. You just have to copy-paste sample code in most cases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With