googleapi中的致命错误 [英] fatal error in googleapi
问题描述
我必须使用php在我的项目中使用google api 该项目:使用Google搜索引擎并收集URL及其源页面
i have to use google api in my project using php the project : using google search engine and gathering urls and their source pages
我下载了google api php客户端,我遵循这里写的内容 https://code.google.com/p/google-api-php-客户/
i downloaded google api php client and i followed what ever is written here https://code.google.com/p/google-api-php-client/
运行后出现此错误:
致命错误:消息为调用GET https://www.googleapis.com/plus/v1/people/me/activities/public?key= [删除]错误"的消息未捕获的异常"Google_ServiceException":(403 )C:\ xampp \ htdocs \ google-api-php-client \ src \ io \ Google_REST.php:66堆栈跟踪:#0 C:\ xampp \ htdocs \ google-api-php-client \ src \ io \ Google_REST.php(36):Google_REST :: decodeHttpResponse(Object(Google_HttpRequest))#1 C:\ xampp \ htdocs \ google-api-php-client \ src \ service \ Google_ServiceResource.php(186):Google_REST :: execute(Object(Google_HttpRequest))#2 C:\ xampp \ htdocs \ google-api-php-client \ src \ contrib \ Google_PlusService.php(58):Google_ServiceResource-> __ call('list',Array)#3 C:\ xampp \ htdocs \ googleapitest.php(31):Google_ActivitiesServiceResource-> listActivities('me','public')#4 {main}抛出了C:\ xampp \ htdocs \ google-api-php-client \ src \ io \ Google_REST.php,第66行
我完全困惑,不知道该怎么办
i am completely confused and don't know what to do
推荐答案
只需删除您的开发人员密钥并添加作用域
Just remove your developer key and add the scope
'www.googleapis.com/auth/userinfo.email',
'www.googleapis.com/auth/userinfo.profile',
'www.googleapis.com/auth/plus.login',
'www.googleapis.com/auth/plus.me'));
这篇关于googleapi中的致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!