Help please

For developers using the Construct 2 Javascript SDK

Post » Wed Oct 17, 2012 3:06 am

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
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Wed Oct 17, 2012 3:07 am

Would it be the following?
varname = response["authResponse"]["accessToken"];

and if so what exactly does the log line do?
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Wed Oct 17, 2012 8:37 pm

@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.
B
68
S
21
G
15
Posts: 701
Reputation: 15,604


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests