-
Notifications
You must be signed in to change notification settings - Fork 26
Description
I have create my client id (include Books and Contacts API, InitPoint = http://127.0.0.1:3030), and modify "oauth_example.dart" as the following code. But I got error message:
Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
https://www.google.com/m8/feeds/contacts/default/full
Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:3030' is therefore not allowed access.
https://www.google.com/m8/feeds/contacts/default/full
XMLHttpRequest cannot load https://www.google.com/m8/feeds/contacts/default/full. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:3030' is therefore not allowed access.
......
void main() {
// use your own Client ID from the API Console here
final auth = new GoogleOAuth2(
"THIS IS MY CLIENT ID",
["https://www.googleapis.com/auth/books", "https://www.google.com/m8/feeds" ]);
......
}
Future _oauthReady(Token token) {
......
//final url = "https://www.googleapis.com/books/v1/volumes/zyTCAlFPjgYC";
final url = "https://www.google.com/m8/feeds/contacts/default/full";
......
}