简体   繁体   English

Freebase PHP Google API(google-api-php-client)

[英]Freebase PHP Google API (google-api-php-client)

I'm using the google-api-php-client ( https://github.com/google/google-api-php-client ) When I try to connect to the Freebase service I get the following error: 我正在使用google-api-php-client( https://github.com/google/google-api-php-client )当我尝试连接到Freebase服务时,我收到以下错误:

Fatal error:  Call to undefined method Google_Service_Freebase::call()

Here's a snippet of my code: 这是我的代码片段:

$freebase->search(array('automotive');

The search function in the Freebase service looks like this: Freebase服务中的搜索功能如下所示:

public function search($optParams = array())
{
  $params = array();
  $params = array_merge($params, $optParams);
  return $this->call('search', array($params));
}

It calls to an internal function call, but it doesn't exists in the class.. 它调用内部函数调用,但它在类中不存在。

Anyone suggestions? 有人建议吗?

I took a look at the lib code (which is in beta and changed a lot since the last version), I think that return line should be: 我看了一下lib代码(自上一版本以来它处于测试版并且发生了很大变化),我认为返回行应该是:

return $this->base_methods->call('search', array($params));

I can't try this now, but if you do and it work, you could submit a bug report on their Github (I saw your post there :). 我现在不能尝试这个,但是如果你这样做并且它有效,你可以在他们的Github上提交错误报告(我在那里看到了你的帖子:)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM