{"id":460,"date":"2008-06-09T12:03:09","date_gmt":"2008-06-09T04:03:09","guid":{"rendered":"http:\/\/www.kenengba.com\/post\/460.html"},"modified":"2008-06-09T18:55:47","modified_gmt":"2008-06-09T10:55:47","slug":"%e5%88%a9%e7%94%a8google-feed-api%e5%8d%b3%e6%97%b6%e5%b1%95%e7%a4%ba%e5%a4%96%e9%83%a8blog%e7%9a%84feed","status":"publish","type":"post","link":"https:\/\/kenengba.com\/post\/460.html","title":{"rendered":"\u5229\u7528Google Feed API\u5373\u65f6\u5c55\u793a\u5176\u5b83\u535a\u5ba2\u7684Feed"},"content":{"rendered":"<p>\u53bb\u5e74\u6211\u66fe\u7ecf\u4ecb\u7ecd\u8fc7\u5728\u4e00\u4e2a\u535a\u5ba2\u5373\u65f6\u8c03\u7528\u5176\u5b83\u535a\u5ba2\u7684RSS Feed\u7684\u65b9\u6cd5-<a title=\"\u5982\u4f55\u5728\u4f60\u7684\u535a\u5ba2\u4e2d\u5373\u65f6\u663e\u793a\u53e6\u4e00\u535a\u5ba2\u7684\u6587\u7ae0\" href=\"http:\/\/www.kenengba.com\/post\/238.html\">\u5229\u7528Google Reader<\/a>\u3002\u8fd9\u79cd\u65b9\u6cd5\u7684\u597d\u5904\u662f\u4f60\u4e0d\u9700\u8981\u77e5\u9053\u4efb\u4f55\u6280\u672f\u7ec6\u8282\uff0c\u4f60\u53ea\u9700\u8981\u6dfb\u52a0\u8ba2\u9605\u5230<a href=\"http:\/\/www.kenengba.com\/index.php?tag=greader\">GR<\/a>\uff0c\u5236\u4f5c\u4e00\u4e2aTag\uff0c\u7136\u540e\u8bbe\u7f6e\u6210\u516c\u5f00\uff0c\u6700\u540e\u8c03\u7528\u3002\u7136\u800c\u8fd9\u79cd\u7b80\u5355\u7684\u65b9\u6cd5\u6709\u4e2a\u4e0d\u597d\u7684\u5730\u65b9\uff0c\u4e00\u662f\u5728\u8c03\u7528\u5217\u8868\u7684\u5e95\u90e8\u4f1a\u6709\u4e2a\u591a\u4f59\u7684Read More\u94fe\u63a5\uff0c\u53e6\u5916\u65e0\u6cd5\u9884\u89c8\u6587\u7ae0\u6458\u8981\u3002\u5229\u7528<a href=\"http:\/\/code.google.com\/apis\/ajaxfeeds\/\">Google Feed API<\/a>\u53ef\u4ee5\u5f88\u597d\u5730\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n<p><img decoding=\"async\" class\/height=\"276\" alt\/width=\"227\" src=\"\/\/lh6.ggpht.com\/wangyanan1981\/SEy3fY5wNrI\/AAAAAAAAArU\/9wbsoI9qIyw\/s800\/snap0617.jpg\" \/><\/p>\n<p><!--more--><\/p>\n<p>\u4e0a\u56fe\u7684Feed\u8c03\u7528\u540c\u65f6\u51fa\u73b0\u5728<a href=\"http:\/\/www.kenengba.com\">\u53ef\u80fd\u5427<\/a>\u53f3\u4fa7\u680f\u7684\u5e95\u90e8\u3002<\/p>\n<p>\u9664\u4e86\u53ef\u4ee5\u5355\u72ec\u8c03\u7528\u4e00\u4e2aFeed\uff0c\u8fd8\u53ef\u4ee5\u540c\u65f6\u8c03\u7528\u591a\u4e2a\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p><img decoding=\"async\" class\/height=\"332\" alt\/width=\"355\" src=\"\/\/lh5.ggpht.com\/wangyanan1981\/SEy652FtTwI\/AAAAAAAAAr0\/q4wkse7_ry4\/s800\/snap0618.jpg\" \/><\/p>\n<p>\u5982\u4f55\u5229\u7528<a href=\"http:\/\/code.google.com\/apis\/ajaxfeeds\/\">Google AJAX Feed API<\/a>\u5b9e\u73b0\u8fd9\u4e2a\u8c03\u7528\u5462\uff1f<\/p>\n<p>\u5982\u679c\u4f60\u5bf9\u4ee3\u7801\u6709\u6050\u60e7\u611f\uff0c\u4e0d\u7528\u5bb3\u6015\uff0c\u653e\u5fc3\u770b\u4e0b\u53bb\uff0c\u4f60\u4f1a\u53d1\u73b0\u5373\u4f7f\u4f60\u548c\u6211\u4e00\u6837\u662f\u4ee3\u7801\u767d\u75f4\u90fd\u80fd\u5f88\u597d\u5730\u4f7f\u7528Feed API\u3002<\/p>\n<p>\u4e0b\u9762\u4e00\u4e2a\u6700\u7b80\u5355\u7684Feed\u8c03\u7528\u4ee3\u7801\uff1a<\/p>\n<p><coolcode lang=\"css\"> <\/p>\n<div id=\"feed-control\"><span style=\"padding-right: 4px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; margin: 10px; color: #676767; padding-top: 4px\">\u6b63\u5728\u52a0\u8f7d&#8230;<\/span>&nbsp;<\/div>\n<p><!-- Google Ajax Api\n  --><script src=\"http:\/\/www.google.com\/jsapi?key=\u4f60\u7684API KEY\"\n    type=\"text\/javascript\"><\/script><!-- Dynamic Feed Control and Stylesheet --><script src=\"http:\/\/www.google.com\/uds\/solutions\/dynamicfeed\/gfdynamicfeedcontrol.js\"\n    type=\"text\/javascript\"><\/script><\/p>\n<style type=\"text\/css\">\n<p>    @import url(\"http:\/\/www.google.com\/uds\/solutions\/dynamicfeed\/gfdynamicfeedcontrol.css\");\n  <\/style>\n<\/p>\n<p><script type=\"text\/javascript\"><\/p>\n<p>function LoadDynamicFeedControl() {\n      var feeds = [{title: '\u53ef\u80fd\u5427', url: 'http:\/\/feeds.kenengba.com\/kenengbarss' }];\n      var options = {\n        numResults : 8,\n        displayTime : 2000,\n        fadeOutTime : 500,\n        scrollOnFadeOut : true,\n        pauseOnHover : true,\n        stacked : false,\n        horizontal : false,\n        title : '\u53ef\u80fd\u5427'\n      }<\/p>\n<p>new GFdynamicFeedControl(feeds, 'feed-control', options);\n    }\n\/\/ Load the feeds API and set the onload callback.\ngoogle.load('feeds', '1');\ngoogle.setOnLoadCallback(LoadDynamicFeedControl);\n<\/script><br \/>\n<\/coolcode><\/p>\n<p>&nbsp;<\/p>\n<p>\u5c06\u4e0a\u9762\u7684\u6a21\u677f\u7a0d\u4f5c\u4fee\u6539\uff0c\u5c31\u80fd\u5728\u535a\u5ba2\u4e0a\u8c03\u7528\u5176\u5b83\u535a\u5ba2\u7684Feed\u3002<\/p>\n<p>\u54ea\u4e9b\u53c2\u6570\u53ef\u4ee5\u4fee\u6539\u5462\uff1f<\/p>\n<p><strong>1\u3001\u8981\u8c03\u7528\u7684Feed<\/strong><\/p>\n<p>\u5c06\u8981\u8c03\u7528\u7684Feed\uff08\u4e00\u4e2a\u6216\u591a\u4e2a\uff09\u5199\u5165\u5230&quot;var feeds&quot;\u91cc\u5934\uff0c\u683c\u5f0f\u5982<font color=\"#ff6600\">{title: &#8216;\u53ef\u80fd\u5427&#8217;, url: &#8216;http:\/\/feeds.kenengba.com\/kenengbarss&#8217; }<\/font>\u8981\uff0c\u8c03\u7528\u591a\u4e2aFeed\uff0c\u4e2d\u95f4\u7528\u9017\u53f7\u5206\u5272\u3002<\/p>\n<p><strong>2\u3001\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n<div dir=\"ltr\" style=\"margin-right: 0px\">\n<p><strong><font color=\"#0000ff\">numResults :<\/font><\/strong><font color=\"#ff0000\"><strong> 8,<\/strong> <font color=\"#000000\">\uff08\u5c55\u793a\u6761\u76ee\u6570\uff0c\u8fd9\u91cc\u75288\uff09<\/font><br \/>\n<\/font><font color=\"#0000ff\"><strong>displayTime :<\/strong><\/font><font color=\"#ff0000\"><strong> 2000,<\/strong> <font color=\"#000000\">\uff08\u5355\u4e2a\u9879\u76ee\u5c55\u793a\u65f6\u95f4\uff0c\u8fd9\u91cc\u75282000\u6beb\u79d2\uff09<\/font><br \/>\n<\/font><font color=\"#0000ff\"><strong>fadeOutTime :<\/strong><\/font><font color=\"#ff0000\"><strong> 500,<\/strong> <font color=\"#000000\">\uff08\u6e10\u53d8\u6d88\u5931\u65f6\u95f4\uff0c\u8fd9\u91cc\u7528500\u6beb\u79d2\uff09<\/font><br \/>\n<\/font><font color=\"#0000ff\"><strong>scrollOnFadeOut :<\/strong><\/font><font color=\"#ff0000\"><strong> true,<\/strong> <font color=\"#000000\">\uff08\u6eda\u52a8\u6d88\u5931\uff0c\u8bbe\u7f6e\u6210false\u7684\u8bdd\u6bcf\u4e2a\u6761\u76ee\u5c06\u4ee5\u6de1\u51fa\u7684\u65b9\u5f0f\u6d88\u5931\uff09<\/font><br \/>\n<\/font><font color=\"#0000ff\"><strong>pauseOnHover :<\/strong><\/font><font color=\"#ff0000\"><strong> true,<\/strong> <font color=\"#000000\">\uff08\u8bbe\u7f6e\u6210false\u7684\u8bdd\u9f20\u6807\u7ecf\u8fc7\u67d0\u4e2a\u6761\u76ee\u4e0d\u4f1a\u663e\u793a\u6458\u8981\uff09<\/font><br \/>\n<\/font><font color=\"#0000ff\"><strong>stacked :<\/strong><\/font><font color=\"#ff0000\"><strong> false,<\/strong><font color=\"#000000\"> \uff08\u8bbe\u7f6e\u6210true\u7684\u8bdd\u5c06\u5728\u540c\u65f6\u5c55\u793a\u591a\u4e2afeed\uff0cfalse\u5219\u8f6e\u756a\u5c55\u793a\uff09<\/font><br \/>\n<\/font><font color=\"#0000ff\"><strong>horizontal :<\/strong><\/font><font color=\"#ff0000\"><strong> false,<\/strong> <font color=\"#000000\">\uff08\u8bbe\u7f6e\u6210true\u7684\u8bdd\u5c06\u4ee5\u4e00\u4e2a\u4e00\u4e2a\u6761\u76ee\u5730\u5c55\u793afeed\uff0c\u800c\u4e0d\u662f\u5217\u8868\u5f62\u5f0f\uff09<\/font><br \/>\n<\/font><font color=\"#0000ff\"><strong>title :<\/strong><\/font><font color=\"#ff0000\"><strong> &#8216;\u53ef\u80fd\u5427&#8217;<\/strong> <\/font><font color=\"#000000\">\uff08\u6807\u9898\uff09<\/font><\/p>\n<\/div>\n<p><font color=\"#000000\">\u6bcf\u4e2a\u53c2\u6570\u4e4b\u95f4\u7528\u9017\u53f7\u5206\u5272\u3002\u66f4\u591a\u9ad8\u7ea7\u53c2\u6570\u53ef\u4ee5\u53c2\u8003Google\u7684\u5e2e\u52a9\u6587\u6863\u3002<\/font><\/p>\n<p><font color=\"#000000\"><strong>3\u3001\u7533\u8bf7API Key<\/strong><\/font><\/p>\n<p><font color=\"#000000\">\u6ce8\u610f\u5230\u6a21\u677f\u4e2d\u7684&ldquo;\u4f60\u7684API Key&ldquo;\uff0c\u8981\u8c03\u7528Feed API\uff0c\u4f60\u9700\u8981\u9996\u5148\u5230<a href=\"http:\/\/code.google.com\/apis\/ajaxfeeds\/signup.html\">\u8fd9\u91cc\u7533\u8bf7API KEY<\/a>\uff0c\u9a6c\u4e0a\u5c31\u80fd\u751f\u6210\u3002<\/font><\/p>\n<p><font color=\"#000000\"><strong>4\u3001CSS\u4fee\u6539<\/strong><\/font><\/p>\n<p><font color=\"#000000\">\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u4f60\u4e0d\u9700\u8981\u53bb\u4fee\u6539CSS\uff0c\u9664\u975e\u4f60\u662f\u4e2a\u7279\u522b\u559c\u6b22\u81ea\u5b9a\u4e49\u7684\u4eba\u3002<\/font><\/p>\n<p><font color=\"#000000\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cFeedAPI\u8c03\u7528\u7684\u662f<a href=\"http:\/\/www.google.com\/uds\/solutions\/dynamicfeed\/gfdynamicfeedcontrol.css\">http:\/\/www.google.com\/uds\/solutions\/dynamicfeed\/gfdynamicfeedcontrol.css<\/a>\u8fd9\u4e2aCSS\u6837\u5f0f\uff0c\u5982\u679c\u4f60\u60f3\u4e2a\u6027\u5316\u4e00\u70b9\uff0c\u53ef\u4ee5\u4e0b\u8f7d\u8fd9\u4e2aCSS\uff0c\u7136\u540e\u4fee\u6539\u6210\u81ea\u5df1\u559c\u6b22\u7684\u6837\u5f0f\u3002<\/font><\/p>\n<p><font color=\"#000000\">\u7136\u540e\u5728\u5c06\u65b0\u7684CSS\u6dfb\u52a0\u5230\u6a21\u677f\u91cc\u3002<\/font><\/p>\n<p><font color=\"#000000\"><strong>5\u3001\u52a0\u5165\u5230\u535a\u5ba2<\/strong><\/font><\/p>\n<p><font color=\"#000000\">\u5c06\u4fee\u6539\u597d\u7684\u6574\u5757\u4ee3\u7801\u653e\u5165\u5230\u4f60\u60f3\u5c55\u793a\u7684\u4f4d\u7f6e\uff0c\u5c31\u50cf\u53ef\u80fd\u5427\u7684\u53f3\u4fa7\u680f\u3002<\/font><\/p>\n<p><font color=\"#000000\"><strong>6\u3001\u6293\u53d6\u9891\u7387<\/strong><\/font><\/p>\n<p><font color=\"#000000\">Google AJAX Feed API\u5bf9feed\u7684\u6293\u53d6\u5927\u6982\u662f1\u5c0f\u65f6\u4e00\u6b21\u3002\u66f4\u65b0\u91cf\u5927\u7684\u535a\u5ba2\u6293\u53d6\u9891\u7387\u4f1a\u76f8\u5e94\u63d0\u9ad8\u3002<\/font><\/p>\n<p><font color=\"#000000\"><strong>7\u3001\u9047\u5230\u7684\u95ee\u9898<\/strong><\/font><\/p>\n<p><font color=\"#000000\">\u5982\u679c\u4e0d\u4fee\u6539CSS\uff0c\u5728IE7\u4e0bFeed API\u663e\u793a\u6b63\u5e38\uff0c \u4f46\u5728Firefox 2\u4e0b\u4e0d\u80fd\u8c03\u7528CSS\uff0c\u4e5f\u5c31\u662f\u7b2c\u4e09\u70b9\u4e2d\u63d0\u5230\u7684\u9ed8\u8ba4CSS\u3002\u6211\u4e0d\u77e5\u9053\u8fd9\u662f\u4e0d\u662f\u6211\u4e2a\u4eba\u9047\u5230\u7684\u95ee\u9898\u3002<\/font><\/p>\n<p><font color=\"#000000\">\u8981\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u5f88\u7b80\u5355\uff0c\u5c06\u9ed8\u8ba4\u7684CSS\u4e0b\u8f7d\uff0c\u7136\u540e\u5c06\u91cc\u9762\u7684\u5185\u5bb9\u590d\u5236\u5230\u6a21\u677f\u4e2d\uff0c\u66ff\u6362\uff1a<\/font><\/p>\n<div dir=\"ltr\" style=\"margin-right: 0px\">\n<p><font color=\"#000000\"><font color=\"#ff0000\"><strong>@import url(&quot;http:\/\/www.google.com\/uds\/solutions\/dynamicfeed\/gfdynamicfeedcontrol.css&quot;);<\/strong><\/font> <\/font><\/p>\n<\/div>\n<p><font color=\"#000000\">\u5373\u53ef\u3002<\/font><\/p>\n<p><font color=\"#000000\"><strong>8\u3001\u5176\u5b83\u7528\u9014<\/strong><\/font><\/p>\n<p><font color=\"#000000\">1\u3001\u5c55\u793a\u6700\u65b0\u7559\u8a00\uff08Wordpress\u63d0\u4f9b\u6700\u65b0\u8bc4\u8bba\u7684RSS\u8f93\u51fa\uff09\u3002<\/font><\/p>\n<p><font color=\"#000000\">2\u3001\u6a21\u62df<a title=\"\u4e2a\u4eba\u4fe1\u606f\u805a\u5408\u670d\u52a1FriendFeed\u8bd5\u7528\u624b\u8bb0\" href=\"http:\/\/www.kenengba.com\/post\/386.html\">Friend Feed<\/a>\u3002Friend Feed\u4e5f\u662f\u5c06\u6240\u6709RSS\u5408\u5e76\u5728\u4e00\u8d77\uff0c\u5229\u7528Google AJAX Feed API\uff0c\u4f60\u5b8c\u5168\u53ef\u4ee5\u5b9e\u73b0Firend Feed\u6240\u80fd\u5b9e\u73b0\u7684\u529f\u80fd\u3002<\/font><\/p>\n<p><font color=\"#000000\">\u6700\u540e\uff0c\u5e0c\u671b\u6211\u7684\u8868\u8ff0\u4f60\u80fd\u5b8c\u5168\u7406\u89e3\u3002<\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"lead\">\u53bb\u5e74\u6211\u66fe\u7ecf\u4ecb\u7ecd\u8fc7\u5728\u4e00\u4e2a\u535a\u5ba2\u5373\u65f6\u8c03\u7528\u5176\u5b83\u535a\u5ba2\u7684RSS Feed\u7684\u65b9\u6cd5-\u5229\u7528Google Reader\u3002\u8fd9\u79cd\u65b9\u6cd5\u7684\u597d\u5904\u662f\u4f60\u4e0d&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"btn btn-danger\" href=\"https:\/\/kenengba.com\/post\/460.html... ","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[279,15,82,132,134],"class_list":["post-460","post","type-post","status-publish","format-standard","hentry","category-3","tag-api","tag-google","tag-rss","tag-132","tag-134"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/kenengba.com\/wp-json\/wp\/v2\/posts\/460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenengba.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenengba.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenengba.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kenengba.com\/wp-json\/wp\/v2\/comments?post=460"}],"version-history":[{"count":0,"href":"https:\/\/kenengba.com\/wp-json\/wp\/v2\/posts\/460\/revisions"}],"wp:attachment":[{"href":"https:\/\/kenengba.com\/wp-json\/wp\/v2\/media?parent=460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenengba.com\/wp-json\/wp\/v2\/categories?post=460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenengba.com\/wp-json\/wp\/v2\/tags?post=460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}