I’m frustrated

XHR2.send() returns error

trying to validate a userAccessToken in servercode. First I realised I was forced to use Appery's function to utilize XHR, unlike the normal clientcode in the appbuilder. Then when I run it, I get an error in the trace. I couldn't find anyone having a similar issue so I guess I have to ask.

//This is the queryURL
var queryURL = "graph.facebook.com/debug_token?input_token={" + fbToken + "}&access_token={AppId}|{Secret}";

//This is trying to use the queryURL
var XHRResponse = XHR2.send("GET", queryURL, {});

I run this in servercode and I get "Script fb_login: ApperyioAPI: You did not supply enough values to fill path parameters" from the trace, this makes no sense at all for me.

If I change to simple XHR I get Script fb_login: ApperyioAPI: URL has incorrect format.

I've tried numerous small changes and I have outputted the string to console and it looks exactly like the recommended url I get when reading about checking user tokens. I also tried url encoding the the string to no avail, same error. What is the gottcha I'm missing here?

Is there maximum length on the url or something that makes doing stuff with facebook impossible?

Thank you.
1 person has
this question