Help please

0 favourites
  • 3 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I seem to have deleted my old facebook plugin from my desktop and I can't remember how I got the third_pary_id that facebook has. Says I need the access token which is where I'm currently having a brain meltdown. Here's where I think it goes in the current plugin:

    FB.getLoginStatus(function(response) {

                        if (response["authResponse"])

                        {

                             fbUserID = response["authResponse"]["userID"];

                             log("User ID = " + fbUserID);

                             onFBLogin();

                        }

                   });

    And here is what I think goes into it somehow:

    if (response.authResponse) {

                   $('#AccessToken').val(response.authResponse.accessToken);

                } else {

                   // do something...maybe show a login prompt

                }

    How do I add this in so I can make field calls to the graph api? I think I can mange the expression part I just need help plugging in the access token so I can assign i to a var.

    Any help would be greatly appreciated :)

    Lance

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Would it be the following?

    varname = response["authResponse"]["accessToken"];

    and if so what exactly does the log line do?

  • Ashley,

    The above comment was the correct way to get the accesstoken in case you want to add it in a future build. I just added an expression and variable for the above and it works fine. :) Now to figure out the third party field thing.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)