Ok so like you suggest,
$.ajax({
url: "https://www-opensocial.googleusercontent.com/api/people/@me/@all",
dataType: 'jsonp',
data: {
alt: 'json-in-script'
},
headers: {
'Authorization': 'Bearer ' + token
},
success: function(data, status) {
return console.log("The returned data", data);
}
});
Here is the request from that:
1. Request URL:
https://www-opensocial.googleusercontent.com/api/people/@me/@all?callback=jQuery16206742984144948423_1316100391760&alt=json-in-script&_=1316100391779
2. Request Method:
GET
3. Status Code:
403 The currently logged in user and/or the gadget requesting data, does
not have access to people data.
4. Query String Parametersview URL encoded
1. callback:
jQuery16206742984144948423_1316100391760
2. alt:
json-in-script
3. _:
1316100391779
5. Response Headersview source
1. cache-control:
private, max-age=0
2. content-encoding:
gzip
3. content-length:
193
4. content-type:
text/html; charset=UTF-8
5. date:
Thu, 15 Sep 2011 15:26:31 GMT
6. expires:
Thu, 15 Sep 2011 15:26:31 GMT
7. server:
GSE
8. status:
403 The currently logged in user and/or the gadget requesting data,
does not have access to people data.
9. version:
HTTP/1.1
10. x-content-type-options:
nosniff
11. x-frame-options:
SAMEORIGIN
12. x-xss-protection:
1; mode=block
Again, as you say it looks the header is not being set.
Sorry I don't really use breakpoints much so I don't really know how to set
one in the correct place and check if the header is set. I will try to learn
how to do that now. Maybe you know another way or could point me in the
right direction?
--
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/contacts/community/forum.html