小工具错误 [英] Gadget error

查看:89
本文介绍了小工具错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在开发小工具.我正在尝试从其他站点捕获它的价值.我正在尝试这个例子.它没有显示任何输出或任何错误.请告诉我为什么输出不出来.

示例代码:

Hi,

I am working on gadgets. I am trying to catch the values of it from other site. I am trying this example. It is not showing any output or any error. Please tell me why the output is not coming.

Example code:

<module>
  <moduleprefs title="Data Pipelining - httprequest">
    <require feature="opensocial-0.9" />
    <require feature="opensocial-data" />
    <require feature="opensocial-templates" />
  </moduleprefs>
  <content type="html">
  <![CDATA[ 
    <script type="text/os-data" 
            xmlns:os="http://ns.opensocial.org/2008/markup" >
       <os:HttpRequest key="exampledata" href="http://www.example.com" format="text"/>
    </script>
    <script type="text/javascript">
      var exampledata = opensocial.data.getDataContext().getDataSet(''exampledata'');
      alert(''Got: '' + exampledata.content);
    </script>
    <script type="text/os-template" 
            xmlns:os="http://ns.opensocial.org/2008/markup" 
            xmlns:osx="http://ns.opensocial.org/2009/extensions" 
            require="exampledata">
      Got ${exampledata.content}
    </script>
  ]]>
  </content>
</module>

推荐答案

{exampledata.content} </script> ]]> </content> </module>
{exampledata.content} </script> ]]> </content> </module>


这是Opensocial API.一开始尝试一些简单的方法.例如放你好,世界! :D另外,操作系统缓存代理也可能有问题-每次更改后,您可能需要按某种按钮,例如更新小工具".在 iwiw.hu
It is Opensocial API. Try something simpler for the beginning. For example put HELLO, WORLD! :D Also there may be problem with OS caching proxy - you may need to press some kind of button like "Update gadget" after every change. Faced similar problem on iwiw.hu


这篇关于小工具错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆