以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 Google 应用 』   (http://bbs.xml.org.cn/list.asp?boardid=51)
----  求助:关于google base 目标国家  (http://bbs.xml.org.cn/dispbbs.asp?boardid=51&rootid=&id=75997)


--  作者:mli3282
--  发布时间:7/13/2009 10:37:00 AM

--  求助:关于google base 目标国家
最近我用google base API编写一段代码,向google 提交商品信息,有几个问题不清楚:
1、商品的目标国家不知道怎么设置?
2、目标国家都有哪些?
3、我加入的商品在google 购物搜索中搜不到,是什么原因?跟目标国家的设置有没有关系?

主要代码如下:
GoogleBaseService service = new GoogleBaseService("Google-Tutorial-1.0");
service.setUserCredentials(email, password);
GoogleBaseEntry entry = new GoogleBaseEntry();
entry.setTitle(TextConstruct.create(TextConstruct.Type.TEXT,
     "英华OK201", null));
entry.setContent(TextConstruct.create(TextConstruct.Type.TEXT,
     "橘色背景灯 收音机", null));
entry.getGoogleBaseAttributes().setItemType("products");
entry.getGoogleBaseAttributes().addTextAttribute("condition","new");
entry.getGoogleBaseAttributes().setPrice(new NumberUnit(398.00,"CNY"));
entry.getGoogleBaseAttributes().addTextAttribute("id","1");
entry.getGoogleBaseAttributes().addImageLink("http://shopadmin.nxeb.cc/Upload/100005091/number0001520081030145033660.jpg");
entry.addLink(new Link("external","","http://nxdx123.nxeb.cc/Goods/Goodsnumber00015.html"));
entry.getGoogleBaseAttributes().addShippingAttribute("shipping", new Shipping("CN","",(float) 398.00,"CNY"));
GoogleBaseEntry asInserted = service.insert(FeedURLFactory
     .getDefault().getItemsFeedURL(), entry);
URL myEntryId = new URL(asInserted.getId());

请高手指导!!!


--  作者:itsbattery
--  发布时间:7/14/2009 3:03:00 PM

--  
你去Google论坛吧。。
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
6,684.082ms