Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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>
Posted
Updated 23-Aug-10 0:40am
v2
Comments
Christian Graus 23-Aug-10 5:06am    
What do you mean by 'gadgets' what are you working with, what framework ?
Sandeep Mewara 23-Aug-10 6:41am    
Framework? Language?

1 solution

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
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900