Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
339 views
in Technique[技术] by (71.8m points)

php - fatal error in googleapi

i have to use google api in my project using php the project : using google search engine and gathering urls and their source pages

i downloaded google api php client and i followed what ever is written here https://code.google.com/p/google-api-php-client/

after running i ge this error:

Fatal error: Uncaught exception 'Google_ServiceException' with message 'Error calling GET https://www.googleapis.com/plus/v1/people/me/activities/public?key=[REDACTED]: (403) Access Not Configured' in C:xampphtdocsgoogle-api-php-clientsrcioGoogle_REST.php:66 Stack trace: #0 C:xampphtdocsgoogle-api-php-clientsrcioGoogle_REST.php(36): Google_REST::decodeHttpResponse(Object(Google_HttpRequest)) #1 C:xampphtdocsgoogle-api-php-clientsrcserviceGoogle_ServiceResource.php(186): Google_REST::execute(Object(Google_HttpRequest)) #2 C:xampphtdocsgoogle-api-php-clientsrccontribGoogle_PlusService.php(58): Google_ServiceResource->__call('list', Array) #3 C:xampphtdocsgoogleapitest.php(31): Google_ActivitiesServiceResource->listActivities('me', 'public') #4 {main} thrown in C:xampphtdocsgoogle-api-php-clientsrcioGoogle_REST.php on line 66

i am completely confused and don't know what to do

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

That error often means you're not matching your access requirements in the API console - i.e. if you have IP or referrer restrictions configured.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...