Why facebook sdk won't work with ejecta and cocoonJS?

Discussion and feedback on Construct 2

Post » Wed Aug 20, 2014 2:59 pm

Ok, just need to wait for my alpha test apk to be published through Google Play.
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Thu Aug 21, 2014 10:05 am

@lanceal Yeah.. I can't get it working.

I did everything I could think of doing.

Added the facebook service to Ludei settings. Added the the android app as a platform. Added the app id to the plugin.

Then did a simple test of touch a sprite which should trigger the fb login, but nothing. :/
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Thu Aug 21, 2014 1:52 pm

@TheWyrm do you know anything about the android facebook setup? My test plugin loads perfectly fine but it fails because the URL isn't allowed. Ios has a bundleid and android has something similar when adding your app to facebook. I don't have any idea what these are though because I've never had a use for a Mobile app. If we can just cross this last bridge on the whole URL or bundleid thing then I will have a working cocoonjs plugin for everyone. If someone can help with this last part I am more than happy explaining to them how to get the facebook api to load and give them a copy of my full facebook plugin.
www.h1k3.tech

We are here for you!
B
90
S
24
G
16
Posts: 716
Reputation: 17,032

Post » Thu Aug 21, 2014 4:23 pm

@lanceal Go to https://developers.facebook.com. Then go to Apps > Create a new app and enter anything you need to create the app. Then go to Settings > + Add Platform and choose one. I would start with Android as its easier to get an app up and running. Package Name will be something you setup for the app i.e. com.thewyrm.game. The Class Name will be the same as the package name from what I've found. The hashkey you'll need to extract from the keystore file you used to sign the APK with. I suspect you may struggle with the last part since you haven't done any mobile stuff before.

Send a capx and the plugin to mat(AT)thewyrm.com and I'll do the mobile stuff.
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Thu Aug 21, 2014 4:43 pm

Hello! Just saw @TheWyrm 's tweet.

The plugin used to work... Stopped working after CocoonJS 2.0 if I am not mistaken. Facebook couldn't initialize anymore. Probably something wrong in https://github.com/calimaborges/constru ... e.js#L1067

Code: Select all
 this.socialService["requestInitialization"]({
    applicationID: fbAppID,
    channelURL: 'channel.html'
});


I tried to debug it for sometime, but I ended giving up. I haven't tried to mess with it for sometime now but I would be glad to help. I can start debugging it again to see if I can get more details about what is wrong.
B
4
Posts: 9
Reputation: 243

Post » Thu Aug 21, 2014 5:00 pm

@calimaborges

I'm having the exact opposite problem. :) I can load the api but I can't seem to get facebook to recognize the URL. I heard something about using a bundleid instead of adding a domain? Is that making sense? Drop me a message or look me up on facebooke at facebook.com/hikenh. Maybe we can figure it out. I had to drop the ludei structure altogether in order to load the api. In order for it to load I have to create the facebook div, load the facebook sdk. I then have to add an on load event. The on load event will fire off the fb.api. All that works splendidly I'm just stuck on figuring out which domain to use or how to make this bundleid thing work in its place.
www.h1k3.tech

We are here for you!
B
90
S
24
G
16
Posts: 716
Reputation: 17,032

Post » Thu Aug 21, 2014 5:38 pm

@lanceal

I remember adding a iOS platform and filling a bundle id at Facebook App configuration . I think I had to use the Customized CocoonJS Launcher App to test it. I am not sure if it is required though.

I am at work right now, so I don't have Construct 2 installed and Facebook is blocked by proxy. I will probably be of more assistance in about 5 hours when I arrive at home. =)
B
4
Posts: 9
Reputation: 243

Post » Thu Aug 21, 2014 6:12 pm

@calimaborges Great to hear. My shot in the dark trying to contact you wasn't in vain. :D The main problem starting with the iOS platform is you kind of need an app already on the appstore before you get the bundleid AFAIK.

@lanceal Does that mean you don't want my assistance as I described above?
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Thu Aug 21, 2014 6:19 pm

@TheWyrm

The more the merrier :) I'll send you my beta version when I get home. :)
www.h1k3.tech

We are here for you!
B
90
S
24
G
16
Posts: 716
Reputation: 17,032

Post » Thu Aug 21, 2014 6:49 pm

@TheWyrm it is an honor to have my plugin considered :D I think I remember testing it without configuring it at App Store (didn't have to publish it, for sure)...

I believe it would suffice use the compiled CocoonJS Launcher as long as its Bundle ID is the same as the one set in Facebook App Configuration.
B
4
Posts: 9
Reputation: 243

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests