This is my code:
$.ajax({
url: 'https://www.google.com/m8/feeds/contacts/default/full',
dataType: 'jsonp',
data: { access_token: token, max-results: '5000', alt: 'json' },
success:function(data){ /*magic*/ }
});
The issue is that max-results has the "-" character.
How can I work around this and keep the parameter?
Just use a string literal as the name of the property
$.ajax({
url: 'https://www.google.com/m8/feeds/contacts/default/full',
dataType: 'jsonp',
data: { access_token: token, 'max-results': '5000', alt: 'json' },
success:function(data){ /*magic*/ }
});