我正在使用Google Place Photos
here来获取照片......
所以根据网站引用..首先要求photoreference
使用
"https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=".$store['lat'].",".$store['lng']."&radius=500&types=store&name=walmart&key=".$key."&sensor=false"
我得到了photoreference
CoQBdAAAAGIEWyhWUoIkJkoD6hkoAE0xrbj_JYyi1vm9SN4eP1NxNxAWTV21UJiLx4zB-Z5qBE7hAZIdaS7BWCPj9yNnYbJ3_NCHUBowyveWH8Tuagst-8qnfcBbIQa_WtE0yjub4SD8hrNXY-oxA139fmESJgNFPtZRw6H_2ot-wJxn8UhGEhBbMVy0BEk76MFRGIetwwDGGhRAJeKs1D5tjSP2PdFybPBjJiMmpA
然后请求使用相同密钥$key
https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference=CoQBdAAAAGIEWyhWUoIkJkoD6hkoAE0xrbj_JYyi1vm9SN4eP1NxNxAWTV21UJiLx4zB-Z5qBE7hAZIdaS7BWCPj9yNnYbJ3_NCHUBowyveWH8Tuagst-8qnfcBbIQa_WtE0yjub4SD8hrNXY-oxA139fmESJgNFPtZRw6H_2ot-wJxn8UhGEhBbMVy0BEk76MFRGIetwwDGGhRAJeKs1D5tjSP2PdFybPBjJiMmpA&sensor=true&key=".$key."
但它返回错误
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
</Error>
但关键是有效的
任何想法如何解决这个问题?