I am trying to use google_plus_v1_api + google_oauth2_client in a chrome-packaged application.
Everythin works fine when I use only oauth2 lib:
chrome.identity.getAuthToken(new chrome.TokenDetails(interactive:true)) .then((token){ OAuth2 auth = new SimpleOAuth2(token); var request = new HttpRequest(); request.onLoad.listen((d){print(request.response); request.open('GET', 'https://www.googleapis.com/plus/v1/people/me'); auth.authenticate(request).then((request) => request.send()); });
But I can not get google + lib to work:
chrome.identity.getAuthToken(new chrome.TokenDetails(interactive:true)) .then((token){ OAuth2 auth = new SimpleOAuth2(token); Plus plus = new Plus(auth); plus.people.get('me').then((d)=>print(d)); });
Throw this exception:
GET https://www.googleapis.com/plus/v1/people/me 403 (Forbidden) Exception: APIRequestException: 403 Daily limit for unauthenticated users Use Exceeded. To continue using registration is required.
Am I missing something? How should I use google + api lib?
, , , , makeAuthRequests Plus true:
makeAuthRequests
Plus
true
final plusclient.Plus plus = new plusclient.Plus(auth) ..makeAuthRequests = true;
, auth . , makeAuthRequests true Plus OAuth2, , -, (, ).
, , :
plus.oauth_token = auth.token.data;
google_plus_v1_api . .
Source: https://habr.com/ru/post/1535435/More articles:Python raising with two parameters - pythonAre conflict resolution sub-interfaces the default? - javaРасширения Visual Studio для библиотеки Windows для версии JavaScript 2.1.30324.52, похоже, застряли в "Настройка вашей системы. Это может занять некоторое время". - javascriptHow to scale kinect depth image to apply LBP on it in Matlab? - image-processingWhat is the difference between res.render () and ejs.render () in Node.js and an Express application - javascriptRCurl JSON data for JIRA REST add problem - rDifficulty inserting std :: unordered_multiset - c ++"Hack" to get the working parameter of the float parameter, but compromised in both g ++ and clang - c ++How do anonymous methods omit the parameter list? - c #Generating a number (0,1) using mersenne twister C ++ - c ++All Articles