Facebook For CocoonJS

Post your completed addons to share with the community

Post » Sun Dec 02, 2012 4:52 pm

Ok im sure you guys got excited by the title but its not there yet...
I see some people have given this some thought but nobody has really tried to implement it im sure everyone's been wanting it from what i see and the webview that cocoonJS allowes it shouldnt be to hard what im going to do is take scirras facebook plugin and transform it to work with webvies in cocoonJS i have a pretty good plan so far. Please i would appretiate some input and suggestions from anyone that has any idea what i talking about

steps im going to take
1.send out a call to the exterior webview page so that instead of this thats in the facebook plugin

Acts.prototype.PromptWallPost = function ()
     {
          if (this.runtime.isDomFree || !fbLoggedIn)
              return;
              
          FB.ui({ "method": "feed" }, function(response) {
                    if (!response || response.error)
                           console.error(response);
              });
     };

to put

Acts.prototype.PromptWallPost = function ()
     {
          if ( window['c2cocoonjs'] || !fbLoggedIn)
          {
              
CocoonJS['App']['forwardAsync']( "PromptTheWallPost( )");
     return;
     };

and in the webview folder put
this function

PromptTheWallPost( ){
FB.ui({ "method": "feed" }, function(response) {
                    if (!response || response.error)
                           console.error(response);
              });
}

Now im still in the planning stages of how im going to tackle this plugin (in my opinion the most important one construct2 comes with)so we can have the best features of html5 within our cocoonJS app which means leader boards achievements and whatever facebook feature the app offers through the web will work with (cocoonJS)android apple and our facebook apps will all be in sync!!
I cant help but feeling i might be missing a step or two please let me know guys N gals any input would be awesome and if anyone is down to tackle this project with me?
eldods2012-12-02 17:06:07
B
20
S
3
Posts: 109
Reputation: 1,967

Post » Tue Dec 18, 2012 3:57 am

I understand cocoons big flaw is currently the lack of Ajax calls? You can use a browser redirect to implement the majority of Facebook integration. I had previously set up my game that way so I know it works great. Although its a real hassle.
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Tue Dec 18, 2012 3:01 pm

** The latest Beta version of Construct2 has fixed this problem ! **

Hi Lanceal,

Do you have an example of the browser redirect working in Cocoonjs?

It just crashes to black screen for me.

Thanks

Dannydannyflint2012-12-18 15:15:08
B
4
Posts: 11
Reputation: 447

Post » Tue Dec 18, 2012 5:14 pm

@danny are you taling about the ajax calls or the facebook plugin
B
20
S
3
Posts: 109
Reputation: 1,967

Post » Tue Dec 18, 2012 5:56 pm

Hi, I was just looking for opening a webpage in a new browser window ( is working after update to latest Beta of C2 )

What I really need is an example of how I can grab a variable from a webpage ( xml or php or whatever really ) - compiling in Cocoonjs.
B
4
Posts: 11
Reputation: 447

Post » Sat Jun 01, 2013 7:54 pm

Hi guys, i'm really interested in this. Any updates?
B
7
S
1
Posts: 14
Reputation: 1,178

Post » Tue Sep 23, 2014 2:09 pm

can anyone help with this providing .capx file and tutorial to configure facebook using coconjs for android?
B
14
S
3
Posts: 50
Reputation: 1,106

Post » Tue Sep 23, 2014 9:30 pm

Search the forums. There is a working plugin now hosted on github.
B
68
S
21
G
15
Posts: 701
Reputation: 15,604


Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests