- Home /
Facebook SDK web player FB.init problem
Hi, I'm trying to run the InteractiveConsole example of the FB skd, I'm using unity 4.2.1 and the FB sdk 4.2.4 (I tried with other version of the FB SKD). I compiled the project and I assigned the apropriate app-id with a valid app that i already created.
Im using Xammp in my computer. in facebook I setup the following
then I go to my web browser and I load the game, but when I clic on FB.init, nothing happens. in the right side,the message still says Facebook Dll: Not Loaded any recomendation? I realy appreciate your help. thanks in advance.
PD: in edit-proyect settings-editor, I write in the field Host URL: http://localhost/
Answer by SkaredCreations · Mar 22, 2014 at 03:25 AM
You cannot use local URLs in a Facebook app, also the new FB rules forces you to use a secure SSL page to host the Unity file. Try to deploy to a Dropbox public folder for example, and set the public link in your Facebook app detail.
Thank you for your help, I upload my binary in dropbox public folder, and now Im able to see the game in facebook(which is excelent!), but again when I clic the button FB.init nothing happens :(
Answer by Kiwasi · Aug 01, 2014 at 07:19 AM
The unity facebook API cannot be used on the webplayer unless the webplayer is deployed on the facebook canvas. The docs do say that, but its hidden so far deep that you will be lucky to find it.
Options to solve are
Deploy the app on facebook canvas
Use a stand alone, IOS or android build
Click the button from within the unity game window
Build your own system to log in