{"id":7501,"date":"2016-05-05T00:02:45","date_gmt":"2016-05-04T15:02:45","guid":{"rendered":"http:\/\/nanoappli.com\/blog\/?p=7501"},"modified":"2016-05-04T23:25:52","modified_gmt":"2016-05-04T14:25:52","slug":"google-client-librarygoogle%e9%80%9a%e4%bf%a1%e3%81%ae%e3%83%87%e3%83%90%e3%83%83%e3%82%b0%e3%83%ad%e3%82%b0%e3%82%92%e7%94%bb%e9%9d%a2%e3%81%ab%e5%87%ba%e5%8a%9b%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/nanoappli.com\/blog\/archives\/7501","title":{"rendered":"[Google Client Library]Google\u901a\u4fe1\u306e\u30c7\u30d0\u30c3\u30b0\u30ed\u30b0\u3092\u753b\u9762\u306b\u51fa\u529b\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>\nGoogleAnalytics API\u306a\u3069\u3001Google Client Library\u306eSDK\u3092\u4f7f\u7528\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308b\u969b\u3001\u8a8d\u8a3c\u51e6\u7406\u306a\u3069\u3001\u901a\u4fe1\u3067\u30a8\u30e9\u30fc\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u3053\u306e\u3088\u3046\u306a\u5834\u5408\u3001\u30c7\u30d0\u30c3\u30b0\u30ed\u30b0\u3092\u51fa\u529b\u3055\u305b\u308b\u3068\u554f\u984c\u306e\u5207\u308a\u5206\u3051\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306b\u3001Google_Config::setLoggerClass()\u306e\u6307\u5b9a\u3084Google_IO_Curl\u30af\u30e9\u30b9\u306e\u30ed\u30b0\u30ec\u30d9\u30eb\u5909\u66f4\u3092\u884c\u3046\u3053\u3068\u3067\u3001\u30c7\u30d0\u30c3\u30b0\u30ed\u30b0\u306e\u51fa\u529b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n<br \/>\n<pre lang=\"php\">\n\/\/ \u52d5\u4f5c\u306e\u30ed\u30ae\u30f3\u30b0\u30af\u30e9\u30b9\u3092\u6307\u5b9a\u3059\u308b\n$config = new \\Google_Config();\n$config->setLoggerClass('Google_Logger_File');\n\n$client = new \\Google_Client($config);\n\n\/\/ cURL\u306e\u30ed\u30b0\u51fa\u529b\u3092VERBOSE\u306b\u3059\u308b\n$client->setClassConfig('Google_IO_Curl', 'options', array( CURLOPT_VERBOSE => TRUE));\n<\/pre>\n<br \/>\n\u4e0a\u8a18\u5909\u66f4\u3092\u884c\u3063\u305f\u3046\u3048\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30ed\u30b0\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<br \/>\n<pre lang=\"x\">\n[04\/May\/2016:23:14:07 +0900] DEBUG: File cache miss {\n    \"key\": \"...\",\n    \"file\": \"\/tmp\/Google_Client\/...\"\n}\n[04\/May\/2016:23:14:07 +0900] DEBUG: OAuth2 access token expired\n[04\/May\/2016:23:14:07 +0900] INFO: OAuth2 access token refresh with Signed JWT assertion grants.\n[04\/May\/2016:23:14:07 +0900] DEBUG: cURL request {\n    \"url\": \"https:\/\/accounts.google.com\/o\/oauth2\/token\",\n    \"method\": \"POST\",\n    \"headers\": {\n        \"content-type\": \"application\/x-www-form-urlencoded\",\n        \"content-length\": 761\n    },\n    \"body\": \"grant_type=assertion&assertion_type=...\"\n}\n* About to connect() to accounts.google.com port 443 (#0)\n*   Trying 216.58.197.173... * connected\n* Connected to accounts.google.com (216.58.197.173) port 443 (#0)\n* Initializing NSS with certpath: none\n* Unable to initialize NSS\n* NSS error -8023\n* Closing connection #0\n* Problem with the SSL CA cert (path? access rights?)\n[04\/May\/2016:23:14:07 +0900] ERROR: cURL Problem with the SSL CA cert (path? access rights?)\n<\/pre>\n<br \/>\n\u30ed\u30b0\u3092\u898b\u308b\u3068NSS error -8023\u3068\u51fa\u3066\u304a\u308a\u3001\u3053\u306e\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u3067\u8abf\u3079\u308b\u3068\u4e0b\u8a18\u304c\u30a8\u30e9\u30fc\u3092\u5f15\u304d\u8d77\u3053\u3057\u305f\u539f\u56e0\u306e\u3088\u3046\u3067\u3059\u3002<br \/>\n<pre lang=\"x\">\nA PKCS #11 module returned CKR_DEVICE_ERROR, \nindicating that a problem has occurred with the token or slot\n<\/pre>\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GoogleAnalytics API\u306a\u3069\u3001Google Client Library\u306eSDK\u3092\u4f7f\u7528\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308b\u969b\u3001\u8a8d\u8a3c\u51e6\u7406\u306a\u3069\u3001\u901a\u4fe1\u3067\u30a8\u30e9\u30fc\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u3088\u3046\u306a\u5834\u5408\u3001\u30c7\u30d0\u30c3\u30b0\u30ed\u30b0\u3092\u51fa\u529b\u3055\u305b\u308b\u3068\u554f\u984c\u306e\u5207\u308a\u5206\u3051\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306b\u3001Google_Config::setLoggerClass()\u306e\u6307\u5b9a\u3084Google_IO_Curl\u30af\u30e9\u30b9\u306e\u30ed\u30b0\u30ec\u30d9\u30eb\u5909\u66f4\u3092\u884c\u3046\u3053\u3068\u3067\u3001\u30c7\u30d0\u30c3\u30b0\u30ed\u30b0\u306e\u51fa\u529b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002 \/\/ \u52d5\u4f5c\u306e\u30ed\u30ae\u30f3\u30b0\u30af\u30e9\u30b9\u3092\u6307\u5b9a\u3059\u308b $config = new \\Google_Config(); $config->setLoggerClass(&#8216;Go\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[1],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":6511,"url":"http:\/\/nanoappli.com\/blog\/archives\/6511","url_meta":{"origin":7501,"position":0},"title":"[Unity]\u5b9f\u6a5f\u78ba\u8a8d\u6642\u306b\u30ed\u30b0\u3092\u753b\u9762\u306b\u51fa\u3059","date":"2014\u5e7410\u670814\u65e5","format":false,"excerpt":"Unity\u3067\u30c7\u30d0\u30c3\u30b0\u3092\u884c\u3063\u3066\u3044\u308b\u969b\u3001\u958b\u767a\u74b0\u5883\u3060\u3068Debug.Log()\u3067\u30ed\u30b0\u3092\u51fa\u529b\u3067\u304d\u307e\u3059\u3002 \u3067\u3059\u304c\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2363,"url":"http:\/\/nanoappli.com\/blog\/archives\/2363","url_meta":{"origin":7501,"position":1},"title":"[C#] WinForm\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089\u30b3\u30f3\u30bd\u30fc\u30eb(\u6a19\u6e96\u51fa\u529b)\u306b\u6587\u5b57\u3092\u51fa\u529b\u3059\u308b","date":"2012\u5e745\u67088\u65e5","format":false,"excerpt":"Windows\u3067\u306f\u901a\u5e38GUI(WinForm)\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3057\u305f\u5834\u5408\u3001\u901a\u5e38\u3067\u306f\u30b3\u30f3\u30bd\u30fc\u30eb\u3078\u306e\u6587\u5b57\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8015,"url":"http:\/\/nanoappli.com\/blog\/archives\/8015","url_meta":{"origin":7501,"position":2},"title":"[FuelPHP]Windows\u3060\u3068\u554f\u984c\u306a\u3044\u306e\u306bLinux\u4e0a\u3060\u3068Class not found\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u3068\u304d\u306b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3053\u3068","date":"2017\u5e742\u670816\u65e5","format":false,"excerpt":"Window\u3060\u3068\u30af\u30e9\u30b9\u306e\u30ed\u30fc\u30c9\u304c\u554f\u984c\u306a\u304f\u884c\u3048\u308b\u306e\u306b\u3001Linux\u4e0a\u3060\u3068\u30af\u30e9\u30b9\u306e\u30ed\u30fc\u30c9\u3067\u30a8\u30e9\u30fc\u306b\u306a\u308b\u5834\u5408\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2513,"url":"http:\/\/nanoappli.com\/blog\/archives\/2513","url_meta":{"origin":7501,"position":3},"title":"[C#]\u81ea\u524d\u3067ToString()\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u6642\u306b\u6c17\u3092\u3064\u3051\u308b\u3079\u304d9\u3064\u306e\u4e8b","date":"2012\u5e745\u670816\u65e5","format":false,"excerpt":"C#\u3067\u306f\u3001Object\u30af\u30e9\u30b9\u304cToString()\u30e1\u30bd\u30c3\u30c9\u3092\u6301\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u5168\u3066\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u3053\u306e\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3004,"url":"http:\/\/nanoappli.com\/blog\/archives\/3004","url_meta":{"origin":7501,"position":4},"title":"[Research Artisan]\u30a2\u30af\u30bb\u30b9\u30ed\u30b0\u3092RSS\u914d\u4fe1\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3","date":"2012\u5e745\u670830\u65e5","format":false,"excerpt":"\u30d5\u30ea\u30fc\u306ePHP\u88fd\u30a2\u30af\u30bb\u30b9\u30ed\u30b0\u89e3\u6790\u30bd\u30d5\u30c8\u3068\u3057\u3066\u6709\u540d\u306aReserch Artisan Lite\u3067\u3059\u304c\u3001\u53d6\u2026","rel":"","context":"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/nanoappli.com\/blog\/wp-content\/uploads\/2012\/05\/20120530_01-500x217.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":7507,"url":"http:\/\/nanoappli.com\/blog\/archives\/7507","url_meta":{"origin":7501,"position":5},"title":"[Google APIs Client Libraries]\u8a8d\u8a3c\u51e6\u7406\u3067OAuth2 access token\u306e\u4fdd\u5b58\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u3068\u304d\u306e\u5bfe\u51e6\u6cd5","date":"2016\u5e745\u67085\u65e5","format":false,"excerpt":"Google APIs Client Libraries\u3092\u4f7f\u7528\u3057\u3066\u3001Google\u306e\u30b5\u30fc\u30d0\u3078\u5bfe\u3057\u3066OA\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts\/7501"}],"collection":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/comments?post=7501"}],"version-history":[{"count":4,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts\/7501\/revisions"}],"predecessor-version":[{"id":7506,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts\/7501\/revisions\/7506"}],"wp:attachment":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/media?parent=7501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/categories?post=7501"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/tags?post=7501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}