Skip to content

Instantly share code, notes, and snippets.

@maxparm
Created September 21, 2012 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxparm/3759221 to your computer and use it in GitHub Desktop.
Save maxparm/3759221 to your computer and use it in GitHub Desktop.
Ajax create/update user
$.ajax({
data: {
fb_uid: 1,
fb_first_name: '',
fb_last_name: '',
fb_access_token: ''
},
dataType: 'json',
type: 'POST',
url: Invoke.env.app.base_url + '/user/create',
success: function (response) {
if (response.success) {
console.log(response.message);
} else {
console.log(response.message);
}
},
error: function () {
alert('An error occured.');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment