GameThirsty's Forum Posts

  • Hi I am getting an error trying to login with Facebook:

    You know what is causing this?

    Thank you!

    Edit: Nevermind I got it, had to change to my Firebase URL

    And how do I get the access token of the Facebook user using Firebase? And what if the access token changes during runtime? Could I get the new one?

    I like the firebase plugin, but it kinda is a blow to have to pay for the service if you go over certain limits, and certain amount of people logged in... :/

  • Thanks IntelRobert

    I am smelling a custom plugin for C2 to be able to do this feature.

    GameThirsty

    Cordova/phonegap provides inappbrowser for oauth and crosswalk includes cordova. You catch the redirect and then kill the window. I haven't done it myself so I am not sure about the details. Here is a description: phonegap-tips.com/articles/google-api-oauth-with-phonegaps-inappbrowser.html

    > Ashley

    >

    > How can I prevent the app from being redirected to the index.html page on my web server then? I have to give the Facebook plugin a redirect url and also inside the Facebook dev console.

    >

    > I don't want to redirect anywhere after login, I want to stay on the app, not the external web page it redirects to.

    >

    > The back button wont work after I had logged in, due to this problem.

    >

    > You can't just redirect back to the app, how would you do that? You have to give a valid http or https address. It redirects to the index file on my web server because thats where I pointed it, as its a valid http address, it redirects with an authentication code so I can use some of Facebooks Graph API's such as getting friends photos, which requires an authentication token.

  • Also, the Facebook plugin you have implemented for C2, does not work for Crosswalk. Ashley IntelRobert

    The default one, I tested that.

  • Ashley

    How can I prevent the app from being redirected to the index.html page on my web server then? I have to give the Facebook plugin a redirect url and also inside the Facebook dev console.

    I don't want to redirect anywhere after login, I want to stay on the app, not the external web page it redirects to.

    The back button wont work after I had logged in, due to this problem.

    You can't just redirect back to the app, how would you do that? You have to give a valid http or https address. It redirects to the index file on my web server because thats where I pointed it, as its a valid http address, it redirects with an authentication code so I can use some of Facebooks Graph API's such as getting friends photos, which requires an authentication token.

  • Ashley, wouldn't this be part of Crosswalk to add Native support for Facebook on their ends?

    Edit: and on the C2 end.

  • Try this code out:

    function openZip(zipcode)

    {

    if (zipcode == '') alert('No postcode entered');

    else window.open ('http://maps.google.co.uk/maps?q=' + zipcode + '&iwloc=A&hl=en','zipcode');

    }

    Then inside a text box put openZip("1010 Vienna")

    The 1010 Vienna is a zip code for an area, you can modify this to your liking.

    I know its not perfect, I am not a pro at JavaScript.

  • Ashley

    Yes the same thing happens inside Chrome. It is technically not a bug, it is doing the right job, inside the Facebook Developer Console, I have Web as my Platform, and I have a redirect URL to my index.html page for my app. So whenever Facebook login comes up, put my credentials in, and login it redirects me to the index.html page on my web server.

    I know this is pointing to my index.html page instead of the Crosswalk export is because I tried to use the action-

    On Mobile Back button pressed -> set Text to "It works!!"

    When I would export and get my .apk file, I would try it, login through Facebook, and come to the layout where I can press the back button, the text does not change. This is why I know it would go to my index.html page, because the Chrome browser does not support back button.

    Now after I have seen it not work that away, I tried a new project inside C2 this time, no Facebook login, and use the same back button action as above, and it worked. The text did change correctly, because I was still running on the export, and not a web page.

    So basically taking the Crosswalk app, and ignoring it. I think this is because there is no Native support for Facebook integration with any mobile devices that run C2 apps. CocoonJS, Crosswalk to be the two major ones without native support.

    In the developers console on Facebook, you can distinguish the platform, and if you choose Android, you have to give a few things for the Android Facebook login to work natively, these are in this screenshot:

    However, even if you added these credentials to the Facebook developers console, there is no way for C2 to use native Facebook integration.

    That would be a great addition in my opinion, you open the doors to many new potential projects.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I have found a roadblock inside Crosswalk/ Construct 2

    I will try to explain this as thoroughly as possible.

    I am using the Facebook Complete plugin created by lanceal. I log into Facebook through the login dialog, which redirects the app to an external web page for Facebook login. However this works, the Facebook API requires a redirect URL, which I have given it, however the redirect URL points to a personal server of mine. So the Crosswalk exported app gets ignored, since the Facebook API redirects the URI to a external web page (page on my server) instead of the exported app.

    I am not sure who to address this to, IntelRobert or Ashley

    There does not seem to be a native login through Facebook option yet, through C2 or Crosswalk, and it would be a great thing to introduce.

    Summary: Crosswalk exported app, login through Facebook, the Facebook API redirects the page to a pointed page on my web server, so basically I am not using the exported app from Crosswalk, I am using a web page.

    Edit: I was looking, Crosswalk does support WebRTC which enables Facebook native like communication? Is this correct?

  • I've also found another issue.

    Facebook login, the older Intel XDK version of exportation allowed the user to stay logged into Facebook but the new Crosswalk export kicks you off Facebook if you close the app.

    Edit:

    IntelRobert Great news!

  • What is cakewalk?

    I think you mean Crosswalk, you can't at the moment. Intel is working hard to bringing you that capability.

  • BluePhaze

    I believe it will work with Intel Crosswalk, since it has full DOM support.

    Don't count on it fully, but I think it does work.

  • IntelRobert

    I will do that, let me scrounge up an example and I will get back you.

    Edit: I have sent you a private message

  • You could use inside "Full Screen in Browser" under project properties set this to "Scale Outer" I use it in most of my apps.

    And also make sure to remove WindowHeight/Width commands.

  • Are you using the new Box2D engine with asm.js?

  • It would be nice to have the User Media object work, and being able to record tiny video clip inside C2 and Play it back.

    But that may be too much to ask for. <img src="smileys/smiley17.gif" border="0" align="middle" />