Facebook plugin not working?

I’m using the latest daily build but I have tried a few others as well. Anyways I have the facebook plugin in my build settings
 

["facebook"] = { publisherId = "com.coronalabs" }

and when I try to do 

local facebook = require("facebook")

I get this error 

"…module ‘facebook’ not found:resource (facebook.lu) does not exist in achieve 

Hi @dmglakewood,

Please post your complete build settings code. And, make sure you don’t have some other Lua module named “facebook.lua” somewhere in the project.

Brent

After further testing I think the issue might be subdirectories. 

If I put this in the main.lua it works fine
 

local facebook = require("facebook")

I put that in this file /login/scenes/sceneSelectUser.lua then it throws that error I posted in the first post. 

Here is my build settings code…I’m also testing this on an android device if that helps any

 

settings = { plugins = { ["plugin.google.play.services"] = { publisherId = "com.coronalabs" }, ["CoronaProvider.ads.vungle"] = { publisherId = "com.vungle" }, ["plugin.gameanalytics"] = { publisherId = "com.gameanalytics", }, ["plugin.advertisingId"] = { publisherId = "com.coronalabs" }, ["plugin.chartboost"] = { publisherId = "com.swipeware" }, ["facebook"] = { publisherId = "com.coronalabs" }, }, orientation = { default = "landscape", supported = { "landscape, landscapeUpsideDown" } }, iphone = { plist = { UIAppFonts = { "Dotrice Regular.otf", "Unispace-Regular.ttf", "ChunkFive Ex.ttf", "Defused Extended Bold.ttf", "Bebas Neue.otf", "Star Jedi.ttf", "Globus.ttf", "FreeSet Bold.ttf", "Vinque.ttf" }, UIApplicationExitsOnSuspend = false, CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon@2x.png", "Icon-72.png", "Icon-144.png", "Icon-60.png", "Icon-60@2x.png", "Icon-76.png", "Icon-76@2x.png" }, UIApplicationExitsOnSuspend = false, }, }, excludeFiles = { -- Exclude all svn files all = { "\*.svn" }, -- Exclude all Android icon files iphone = { "Icon-\*dpi.png" }, -- Exclude iOS "retina" image android = { "Icon\*.png", "\*@2x.png" } }, -- Android permissions androidPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_WIFI\_STATE", "android.permission.READ\_PHONE\_STATE", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.WRITE\_EXTERNAL\_STORAGE", }, }

Well I’m completely lost I setup a project and nested a scene a few directories deep and the facebook plugin worked just fine. I do the same thing in my current project and it throws that error. I have nothing else in my project that uses facebook and no files called facebook. This is driving me crazy. 

I might have found the issue I was calling the composer overlay in a coroutine and for some reason it doesn’t like that.  Anyone know why that would be?

Bump any help or ideas on this? The facebook plugin wont work when an overlay is called from a coroutine. I’m not sure if this is a bug or maybe I don’t know enough about coroutines. 

I would file a bug on this. I don’t know if the facebook SDK is thread safe, but a bug report will let Engineering check it out.

Rob

Hi @dmglakewood,

Please post your complete build settings code. And, make sure you don’t have some other Lua module named “facebook.lua” somewhere in the project.

Brent

After further testing I think the issue might be subdirectories. 

If I put this in the main.lua it works fine
 

local facebook = require("facebook")

I put that in this file /login/scenes/sceneSelectUser.lua then it throws that error I posted in the first post. 

Here is my build settings code…I’m also testing this on an android device if that helps any

 

settings = { plugins = { ["plugin.google.play.services"] = { publisherId = "com.coronalabs" }, ["CoronaProvider.ads.vungle"] = { publisherId = "com.vungle" }, ["plugin.gameanalytics"] = { publisherId = "com.gameanalytics", }, ["plugin.advertisingId"] = { publisherId = "com.coronalabs" }, ["plugin.chartboost"] = { publisherId = "com.swipeware" }, ["facebook"] = { publisherId = "com.coronalabs" }, }, orientation = { default = "landscape", supported = { "landscape, landscapeUpsideDown" } }, iphone = { plist = { UIAppFonts = { "Dotrice Regular.otf", "Unispace-Regular.ttf", "ChunkFive Ex.ttf", "Defused Extended Bold.ttf", "Bebas Neue.otf", "Star Jedi.ttf", "Globus.ttf", "FreeSet Bold.ttf", "Vinque.ttf" }, UIApplicationExitsOnSuspend = false, CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon@2x.png", "Icon-72.png", "Icon-144.png", "Icon-60.png", "Icon-60@2x.png", "Icon-76.png", "Icon-76@2x.png" }, UIApplicationExitsOnSuspend = false, }, }, excludeFiles = { -- Exclude all svn files all = { "\*.svn" }, -- Exclude all Android icon files iphone = { "Icon-\*dpi.png" }, -- Exclude iOS "retina" image android = { "Icon\*.png", "\*@2x.png" } }, -- Android permissions androidPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_WIFI\_STATE", "android.permission.READ\_PHONE\_STATE", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.WRITE\_EXTERNAL\_STORAGE", }, }

Well I’m completely lost I setup a project and nested a scene a few directories deep and the facebook plugin worked just fine. I do the same thing in my current project and it throws that error. I have nothing else in my project that uses facebook and no files called facebook. This is driving me crazy. 

I might have found the issue I was calling the composer overlay in a coroutine and for some reason it doesn’t like that.  Anyone know why that would be?

Bump any help or ideas on this? The facebook plugin wont work when an overlay is called from a coroutine. I’m not sure if this is a bug or maybe I don’t know enough about coroutines. 

I would file a bug on this. I don’t know if the facebook SDK is thread safe, but a bug report will let Engineering check it out.

Rob