A simple swift login implementation with Facebook SDK for iOS version 4.0

Scott Delly
iOS App Development
1 min readApr 2, 2015

Facebook has made some major changes in the new SDK 4.0 that make login more simple to implement. Still, it took me the better part of a day to get the Staance app up and running again with login working. This has a bit to do with the major changes in the SDK and a bit to do with still confusing and disconnected API documentation.

Now that we’re back up, I’ll share with you how we got it going. This is as much for iOS dev veterans as it is for newbies.

First some configuration (no change in SDK v4.0):

In your app’s info.plist add a new row called “FacebookAppID” of type String. Set the value to the App ID from you app’s listing in the Facebook developer portal here : https://developers.facebook.com/apps/

And now the code:

I hope this was helpful, if you like check out my linkedin here:
https://www.linkedin.com/in/scottdelly/

Sources:
https://developers.facebook.com/docs/ios/getting-started/#startcoding
https://developers.facebook.com/docs/facebook-login/ios/v2.3

--

--

Scott Delly
iOS App Development

full stack dev | ios dev | #wanderlust | #foodie | #coffee