Disable Facebook plugin for Windows Phone 8

I’m creating a game for multiple platforms. Because Facebook is not yet supported for Windows Phone 8, I will have to disable the plugin for Windows Phone 8, or else I will not be able to compile (receiving errors about FB.cs).

While using the Facebook plugin for iOS and Android, I would like to compile the same project for Windows Phone 8 without using the Facebook plugin. So, is there any way I can disable the whole plugin for Windows Phone 8, so I can successfully compile?


Check Application.platform for enum RuntimePlatform.WP8Player and exclude the execution of the facebook plugin

You can remove it entirely from the compiled code by using a #if

#if !UNITY_WP8
// code not to include for Windows 8 goes here

All defines are documented at Unity - Manual: Conditional Compilation