如何使用PHP和javascript在我的网站上使用Google API类


How do i use the Google API classes in my website using PHP and javascript?


var jasonData=UrlFetchApp.fetch("http://graph.facebook.com/"+url);
var object=Utilities.jsonParse(jasonData.getContentText());


像这些类,我需要包含在我的代码中并使用它。我该怎么做?

您只能在编写的应用程序脚本代码中使用这些特定函数https://script.google.com.如果你需要访问JavaScript或PHP中的谷歌API,这里有你的选择:

Google JavaScript API客户端

Google PHP API客户端

GoogleAppsScript是一种与PHP类似的服务器端脚本语言。你不能把这两个混在一起。PHP已经具有获取url(即load(url, options))和解析json(即json_decode)的功能。

在这里查看PHP 中的所有可用函数等