Following along the 'build an app with facebook api' tutorial but hit a snag that I (think) I've finally isolated down to the 'access_code' not getting completely stripped to its individual string.
Through the web, when sending the request i get:
access_token=CAADXGeIZBR3MBAPzuF6KOwrlGZBsYnaqK9ZA4TBvG1RelgPIMOtSUNSLAFXs2KmVJXj78oULyjYfWMZBtitvUQE68oLcuT2of3gYgnmJqnpiquB7Dw5Q71kBE9SGtqE36QIBXsEWmwZA3I0ZAZBffwnIAQBQsHbibyo3wP3B9ZBEoYRNNRNF2hnnLL422aeKy14ZD&expires=5175703
After getting run through the JavaScript (referenced below) from step 9 of "Adding a service instance to the page", I get:
CAADXGeIZBR3MBAPzuF6KOwrlGZBsYnaqK9ZA4TBvG1RelgPIMOtSUNSLAFXs2KmVJXj78oULyjYfWMZBtitvUQE68oLcuT2of3gYgnmJqnpiquB7Dw5Q71kBE9SGtqE36QIBXsEWmwZA3I0ZAZBffwnIAQBQsHbibyo3wP3B9ZBEoYRNNRNF2hnnLL422aeKy14ZD&expires
For some reason '&expires' is still appended and not getting stripped/split off. This is then throwing an error ("Malformed access token" "Code 190") when attempting to authenticate on 'get data'.
Here is the code I'm using from the tutorial that is supposed to strip all the extraneous stuff:
var vars = jqXHR.responseText.split("&");
var access_token = vars[0].split("=")[1];
access_token = access_token.replace(/&.+/, "");
localStorage.setItem('access_token', access_token);
Any idea what's not working?