Confusion over the Facebook Plugin (RESOLVED)

Hi all,

First off, believe me, I’ve been on this problem all day… I’ve not just jumped into the forum at the first sign of trouble.

I’ve got a problem with the Facebook Plugin (now needed for builds more recent than 2014.2165) - I am currently running Corona 2014.2189.

My subscription expired a short while ago, so my account has reverted to ‘Starter’… No cash for a while, so I’m stuck with it.

In a nutshell, I’m using the sample code; ‘networking/facebook’ and I can’t get the app to build for iOS… I’ve had a good look around the forum, and there are a few similar instances, but for other plugins.

When the build process starts, I get an out of date SDK warning (it wants 7, I’m running 6), but then I get the error:

Runtime error
    /Users/appleimac/Desktop//Facebook.app/.build/libtemplate/Builder.lua:295: <error>{“status”:32512,“message”:“sh: /Volumes/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++: No such file or directory”}</error>

My first guess was that I was trying to use a plugin, which my subscription didn’t cover, but when that’s happened in the past, the console has always mentioned it. - And I’m pretty sure it’s the “social” plugin, that’s covered by premium membership.

My bundle ID is OK (I think), it’s nothing to do with the app-setup on facebook (I don’t think) and when I comment-out this part of the build settings, it will build (but the doesn’t work on X-code simulator OR a device).

plugins = { ["facebook"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone = true, ["iphone-sim"] = true }, }, },

Really not sure what’s going on… If it is down to my subscription, could you please point me in the direction of a resource or tutorial, that lets me post facebook status/photo’s without the plugin. I’ll even consider reverting to an older build if that’s the best advice I can get. Any help will be appreciated.

All the best

Mark

You can use the facebook.* API’s with a starter account.  That’s not what’s happening here.  Can you post  your whole build.settings?

What happens when you try to build the Facebook sample app unedited from the SampleCode folder?

Hi Rob, I get the same build error with the sample app… I read a few other threads. One in particular which was EXACTLY the same problem. - That guy sorted it out by updating X-Code to 5.1 (I’m running 4.5), but here’s the Kicker. 5.1 will only run 0n a minimum OSX of 10.8.4 (Mountain Lion) - I’m flat broke at the mo’, so I can’t buy the update (I’m running Lion 10.7.5) - And my Mac’s too old to take the new (FREE) Mavericks… Bummer I know!

So as a last resort, I reverted to Corona 1202 and loaded up the sample code ‘Facebook Connect’ script… It built absolutely fine, with no warnings, errors or anything. The only problem I have now is the buttons simply aren’t doing anything… Although I suspect that the line in the facebook sample code:

local appId = 1426811530902348 

is a string, so should have “” - Although I’m not sure if this is the problem TBH.

It’s been a long day

Mark

*** Note, I am now using a version of Corona which isn’t plugin dependent, which I’m a little more comfortable with anyway - Just wish I could get the damn thing to work.

The AppID needs to be in quotes.

The reason we moved it to a plugin was due to Apple rejecting apps that have use the Ad Identifier and the Facebook SDK does.  You will need to probably have at least one ad in your app somewhere to satisfy Apple.  Also, 1202 is built using the iOS 6 SDK which Apple is also rejecting.  You will need to get the 1262 build and use that.  Though I think we did the plugin change after 2100, which is the next-to-most current public build, so if you want to use a Graphics 2.0 build 2100 is probably the one to use on your Mac.

Thanks Rob… I now have the FB connect demo working perfectly. For the purposes of client approval, I don’t want to tempt fate, so I’ll stick with current build. And yes! I missed out the quotes, maybe the next demo build should mention that the APP ID is a string… Having ‘Nul’ where the ID goes, is not very helpful to the uninitiated.

As far as the ‘build error’ goes for the latest public release, having the iOS 7 SDK seems to be paramount.

Thanks for your help, I think we can mark this one as solved.

Mark

As far as documenting it, every time we reference it in docs, guides and sample apps, it’s in quotes. 

When we removed the iOS 6 SDK (since Apple is rejecting them), it forced the minimum XCode and such to a higher level.

Rob, can you kindly elaborate on this one? How about non-ad supported apps, ie paid apps etc. How do we get around this issue? Thanks for your help.

Build with 2189 or later.

You can use the facebook.* API’s with a starter account.  That’s not what’s happening here.  Can you post  your whole build.settings?

What happens when you try to build the Facebook sample app unedited from the SampleCode folder?

Hi Rob, I get the same build error with the sample app… I read a few other threads. One in particular which was EXACTLY the same problem. - That guy sorted it out by updating X-Code to 5.1 (I’m running 4.5), but here’s the Kicker. 5.1 will only run 0n a minimum OSX of 10.8.4 (Mountain Lion) - I’m flat broke at the mo’, so I can’t buy the update (I’m running Lion 10.7.5) - And my Mac’s too old to take the new (FREE) Mavericks… Bummer I know!

So as a last resort, I reverted to Corona 1202 and loaded up the sample code ‘Facebook Connect’ script… It built absolutely fine, with no warnings, errors or anything. The only problem I have now is the buttons simply aren’t doing anything… Although I suspect that the line in the facebook sample code:

local appId = 1426811530902348 

is a string, so should have “” - Although I’m not sure if this is the problem TBH.

It’s been a long day

Mark

*** Note, I am now using a version of Corona which isn’t plugin dependent, which I’m a little more comfortable with anyway - Just wish I could get the damn thing to work.

The AppID needs to be in quotes.

The reason we moved it to a plugin was due to Apple rejecting apps that have use the Ad Identifier and the Facebook SDK does.  You will need to probably have at least one ad in your app somewhere to satisfy Apple.  Also, 1202 is built using the iOS 6 SDK which Apple is also rejecting.  You will need to get the 1262 build and use that.  Though I think we did the plugin change after 2100, which is the next-to-most current public build, so if you want to use a Graphics 2.0 build 2100 is probably the one to use on your Mac.

Thanks Rob… I now have the FB connect demo working perfectly. For the purposes of client approval, I don’t want to tempt fate, so I’ll stick with current build. And yes! I missed out the quotes, maybe the next demo build should mention that the APP ID is a string… Having ‘Nul’ where the ID goes, is not very helpful to the uninitiated.

As far as the ‘build error’ goes for the latest public release, having the iOS 7 SDK seems to be paramount.

Thanks for your help, I think we can mark this one as solved.

Mark

As far as documenting it, every time we reference it in docs, guides and sample apps, it’s in quotes. 

When we removed the iOS 6 SDK (since Apple is rejecting them), it forced the minimum XCode and such to a higher level.

Rob, can you kindly elaborate on this one? How about non-ad supported apps, ie paid apps etc. How do we get around this issue? Thanks for your help.

Build with 2189 or later.