There is also a second way to associate the facebook API with your application, you can drag the src directory from the facebook api, but you need to uncheck the add to destination folder and check "Create groups for any added folders", as in this 
and you need to go to Projektu β Targetets β Build Phases and link libfacebook_ios_sdk.a as on the screen: 
everything should be fine now, and remember that the Facebook instance must be in your AppDelegate!
source share