Google Places API:页面令牌错误 [英] Google Places API : Page Token Errors

查看:77
本文介绍了Google Places API:页面令牌错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我基本上是在查询亚特兰大商店的Google Places API.

I'm basically querying the google places API for stores in atlanta.

https://maps.googleapis.com/maps/api/place/search/json?location=33.7488,-84.3874&radius=50000&sensor=false&key=YOUR_KEY_HERE&types=amusement_park|art_gallery|bakery|bar|beauty_salon|bicycle_store|book_store|bowling_alley|cafe|car_repair|car_wash|clothing_store|florist|furniture_store|gym|hair_care|home_goods_store|jewelry_store|laundry|liquor_store|museum|night_club|pet_store|pharmacy|restaurant|shoe_store|spa|store|veterinary_care|zoo

这按预期返回带有页面令牌的结果,以使用相同的查询来获取另一页数据.

This as expected returns a result with a page token to get another page of data with the same query.

https://maps.googleapis.com/maps/api/place/search/json?key=YOUR_KEY_HERE&page_token=PAGE_TOKEN_HERE

根据他们的API,这是我获取第二页数据所需的第二个URL.但是它总是返回"REQUEST_DENIED".

According to their API this second URL is all I need to get the 2nd page of data. But it ALWAYS returns "REQUEST_DENIED".

"{\n   \"html_attributions\" : [],\n   \"results\" : [],\n   \"status\" : \"REQUEST_DENIED\"\n}\n"

目前尚不清楚为什么我收到请求被拒绝.我远没有我的每日上限.如果我尝试使用包含令牌的第一个URL运行带有所有给定参数的第二个URL,则它的作用就好像我再次请求第一页一样,并完全忽略了page_token.

It's not clear WHY I'm getting request denied. I'm nowhere NEAR my daily limit. If I try to run the 2nd URL with ALL the given parameters from the first URL with the Token Included it acts as if I'm requesting the 1st page all over again and ignores the page_token entirely.

有人让这个page_token工作吗?!?!?!?!?!!

Has anybody gotten this page_token to work?!?!?!?!?!

推荐答案

这是文档中的错误,将尽快修复.正确使用的参数是pagetoken NOT page_token.

This is a bug in the documentation and will be fixed asap. The correct parameter to use is pagetoken NOT page_token.

这篇关于Google Places API:页面令牌错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆