I moved the Scrumptious code to the SimpleLuaExtension App for testing it in Xcode.
Like everyone I am too facing problem with facebook login. I have done everything that is required to make it work and I get following error.
module ‘facebook’ not found:resource (facebook.lu) does not exist in archive
Am using :
Xcode : Version 5.1 (5B130a)
Corona : Version 2014.2411 (2014.8.22)
OS X : Version 10.8.5
Here is my main.lua
local facebook = require( "facebook" ) local json = require( "json" ) local fbAppID = "xxxxxxxxxxxxxxx" -- Just checking if facebook popup is available ( shows false on screen ) isFacebookAvailable = native.canShowPopup( "social", "facebook" ) display.newText( tostring(isFacebookAvailable), 50, 200, "Arial", 15 ) local function facebookListener( event ) if ( "session" == event.type ) then if ( "login" == event.phase ) then local access\_token = event.token end elseif ( "request" == event.type ) then display.newText( "facebook request", 50, 300, "Arial", 15 ) if ( not event.isError ) then local response = json.decode( event.response ) display.newText( response, 50, 350, "Arial", 15 ) end elseif ( "dialog" == event.type ) then display.newText( "dialog"..event.response, 50, 400, "Arial", 15 ) end end facebook.login( fbAppID, facebookListener, { "publish\_actions, email" } )
Here is my build.settings file
settings = { plugins = { ["facebook"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true }, }, }, iphone = { plist = { UIApplicationExitsOnSuspend = false, FacebookAppID = "xxxxxxxxxxxxxxx", CFBundleURLTypes = { { CFBundleURLSchemes = { "fbxxxxxxxxxxxxxxx", } } }, ["URL types"] = { item = { ["URL Schemes"] = { ["Item 0"] = "fbxxxxxxxxxxxxxx" }, }, }, } } }
and Here is my console log
2014-09-03 14:44:07.197 SimpleLuaExtension[5074:90b] Platform: iPhone Simulator / x86\_64 / 7.1 / Apple Software Renderer / OpenGL ES 2.0 APPLE-9.4.3 2014-09-03 14:44:07.243 SimpleLuaExtension[5074:90b] Runtime error module 'facebook' not found:resource (facebook.lu) does not exist in archive no field package.preload['facebook'] no file '/Users/akash/Library/Application Support/iPhone Simulator/7.1/Applications/FB70555B-4BB5-4585-B845-EFBA70E13F0C/SimpleLuaExtension.app/facebook.lua' no file '/Users/akash/Library/Application Support/iPhone Simulator/7.1/Applications/FB70555B-4BB5-4585-B845-EFBA70E13F0C/SimpleLuaExtension.app/facebook.lua' no file './facebook.so' no file '/Users/akash/Library/Application Support/iPhone Simulator/7.1/Applications/FB70555B-4BB5-4585-B845-EFBA70E13F0C/SimpleLuaExtension.app/facebook.so'facebook stack traceback: [C]: in function 'require' ?: in function 'require' /Applications/CoronaEnterprise/Samples/SimpleLuaExtension/ios/../Corona/main.lua:1: in main chunk
The error is caused by
local facebook = require( “facebook” )
if I remove it then I get this error
2014-09-03 15:09:52.848 SimpleLuaExtension[5313:90b] Platform: iPhone Simulator / x86\_64 / 7.1 / Apple Software Renderer / OpenGL ES 2.0 APPLE-9.4.3 2014-09-03 15:09:53.210 SimpleLuaExtension[5313:90b] Runtime error /Applications/CoronaEnterprise/Samples/SimpleLuaExtension/ios/../Corona/main.lua:38: attempt to index global 'loginfb' (a nil value) stack traceback: /Applications/CoronaEnterprise/Samples/SimpleLuaExtension/ios/../Corona/main.lua:38: in main chunk
The error is same for iPhone simulator “iPhone Retina (4-inch)” (a non 64-bit, as suggested by corona staff) and also for iPhone device.
I believe someone will be able to solve this much information. Let me know if you need something from me.