I feel a bit sheepish making this post, as there is obviously something very basic I’m missing.
But first, it looks like there’s a problem with the documentation:
settings =
{
android =
{
facebookAppId = “XXXXXXXXXX”, – Replace XXXXXXXXXX with your Facebook App ID
},
},
Using this, I get an ‘incorrect capitilisation’ warning when Corona starts. If I change it to FacebookAppId with a capital F then the warning disappears.
Now as I said the problem I’m experiencing would appear to be a very simple one. This code that I’ve copied and pasted from the doco gives me an error:
local facebook = require( “plugin.facebook.v4” )
print( "Is a Facebook app installed and accessible? " … tostring(facebook.isFacebookAppEnabled()) )
"Bad argument #1 to ‘tostring’ (value expected)
facebook.isFacebookAppEnabled() doesn’t exist. The plugin is obviously loaded, otherwise I’d get other errors, so why can’t I make this function call?
well maybe it’s not me after all. I just loaded the sample facebook app in the simulator, and clicking the ‘Facebook App Enabled’ button gives me the same error. So obviously this function doesn’t exist after all!
okay so i build and run the facebook app, and there’s no problem calling this function on android. Why doesn’t the simulator handle it (that’s what a simulator is meant to do isn’t it?)
We’ve added a parser to make sure build.settings has things we are looking for. It’s possible that we don’t have that check exactly right. I’ll let engineering know and they can address the false positive. This is just warning and you can ignore it for the time being.
Can you PM me the build.settings file that causes the “incorrect capitalization” warning? I’m not getting it with the Facebook project in the CoronaSDK Samples which has the same spelling of “facebookAppId” as you show above.
Also, if you delete the plugin_facebook_v4.lua in the /Users/[YOUR_USERNAME]/Library/Application Support/Corona/Simulator/Plugins directory and reload your project using the Facebook-v4 plugin, the simulator should download a new stub Lua file which addresses the issue you were having with facebook.isFacebookAppEnabled().
Its the last capital D. For iOS the last D is capital. For Android it’s a lower case ‘d’. If it helps, copy and paste from what I typed in above. It’s directly from the documentation.
well maybe it’s not me after all. I just loaded the sample facebook app in the simulator, and clicking the ‘Facebook App Enabled’ button gives me the same error. So obviously this function doesn’t exist after all!
okay so i build and run the facebook app, and there’s no problem calling this function on android. Why doesn’t the simulator handle it (that’s what a simulator is meant to do isn’t it?)
We’ve added a parser to make sure build.settings has things we are looking for. It’s possible that we don’t have that check exactly right. I’ll let engineering know and they can address the false positive. This is just warning and you can ignore it for the time being.
Can you PM me the build.settings file that causes the “incorrect capitalization” warning? I’m not getting it with the Facebook project in the CoronaSDK Samples which has the same spelling of “facebookAppId” as you show above.
Also, if you delete the plugin_facebook_v4.lua in the /Users/[YOUR_USERNAME]/Library/Application Support/Corona/Simulator/Plugins directory and reload your project using the Facebook-v4 plugin, the simulator should download a new stub Lua file which addresses the issue you were having with facebook.isFacebookAppEnabled().
Its the last capital D. For iOS the last D is capital. For Android it’s a lower case ‘d’. If it helps, copy and paste from what I typed in above. It’s directly from the documentation.