是否可以檢索使用的oauth2的谷歌的地方CLIENT_ID?我能夠檢索Google+的信息,包括ID和Google+個人資料網址,但我需要一種方法來扳平的oauth2用戶對谷歌的地方「的client_id」。使用的oauth2檢索谷歌地方CLIENT_ID
我已經能夠包含oauth2彈出窗口中列出的Places作用域,並要求用戶訪問資源的權限,但無法弄清楚如何檢索經過身份驗證的用戶的client_id。
作用域:
var scopes = 'https://www.googleapis.com/auth/plus.me https://maps.google.com/maps/feeds/ https://www.googleapis.com/auth/places';
Google+的API負載
雖然我可以成功地檢索加上數據,地方API似乎並沒有公開任何數據。這是我曾嘗試過的:
function makeApiCall() {
/* the plus api does retrieve data, but a similar call to places does not
gapi.client.load('plus', 'v1', function() {
var request = gapi.client.plus.people.get({
'userId': 'me'
});
request.execute(function (resp) {
$(".google-signin").find("img").attr('src', resp.image.url).css('height', '32').css('width', '32');
$("#login-msg").text('Welcome: ' + resp.displayName);
$("img.vote").css('visibility', 'visible');
});
});
*/
gapi.client.load('places', 'v1', function() {
debugger
// the gapi.client does not contain a "places" object
var request = gapi.client.places.get({
'userId': 'me'
});
request.execute(function (resp) {
debugger
});
});
}
有關此問題的任何明確表示讚賞。
澄清編輯
也許我沒有讓自己清楚。 Google Places API鼓勵創建與特定地點(業務)相關聯的活動。我們是基於谷歌Places API的搜索和細節響應(原型在top-60.bunkerhill.com跟隨一個或多個鏈接),我們希望企業能夠活動添加到其相關的上市,但不能生成列表在不首先以某種方式將Places詳細信息響應數據與Google Sign-On相關聯的情況下進行此操作;還是我錯過了重要的東西?
所以現在的問題是「用戶可以登錄到任何可用的谷歌OAuth的API,它提供了一些數據,可以用來給用戶一個地方的詳細資料項關聯?
請忽略以前的評論。我已經添加了對我的問題的澄清,並希望您能夠澄清一些問題。 –