I have made a Facebook plugin for use within your unity game.
Add FacebookUnityPlugin.cs to your unity project and you can use the functions in that class.
When you built your scenes in Unity into an xCode-project, you will have to download the facebook iOS SDK from GitHub - facebook/facebook-ios-sdk: Used to integrate the Facebook Platform with your iOS & tvOS apps. and
add the source files to your project.
Also add the FacebookPlugin.h and Facebookplugin.mm to your xCode project. In the .mm file you need to write your facebook appID in the init function -
or you could rewrite the function to take in the ID as a parameter.
Follow the instructions at https://developers.facebook.com/docs/mobile/ios/build/ and change your .plist file accordingly
Init the plugin in AppController.h and .mm and you should be good to go.
You can download the script HERE.
Feel free to use this however you like, commercially or not. If you do want to use the plugin or parts of it commercially,
we would appreciate if you mentioned Cry Wolf Studios in the credits section of your game.
If you want to see the plugin “In Action”, you can check out our game Invading:Insanity