Getting started
1. Register
First you have to register at http://www.hyves.nl/subscribe/ and follow the steps (if your not already an Hyves member).
Second you will have to become an API-developer. Go to http://www.hyves.nl/api/, to apply. After applying you will recieve a feedback message, this message that you are getting is from the API, so you don't have to add a consumer if you want to develop a OpenSocial application.
2. Develop a gadget and add it to your profile
After this second step visit http://www.hyves.nl/api/opensocial/, here you can Toggle the Sandbox mode (for the testing environment). This is the mode where you will only see Sandbox gadgets on your profile.
You can add a sandbox gadget through the link on http://www.hyves.nl/api/opensocial/ (when toggled in Sandbox mode, you will see a Sandbox logo appearing in the header). You will have to add the XML-file-url of your gadget (you will have to host this on your own server). Only other OpenSocial developers with Sandbox mode toggled, can see you sandbox gadgets, depending on your visibility settings of course (like: everybody,friends,etc).
An url could be http://www.apikooien.nl/examples/opensocial/helloworld.xml (Note: only one URL per gadget is possible) with the following code for example:
<?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="Hello world example" summary="" description="" author="" author_email="" thumbnail="" screenshot="" height="380"> <Require feature="opensocial-0.7"/> </ModulePrefs> <Content type="html"> <![CDATA[ <p>Hello world</p> ]]> </Content> </Module>
Now you can see the gadget on the different OpenSocial views appearing (with your Sandbox mode on).
3. Adding your gadget to the live environment
When you have finished development of your gadget you can register for an OpenSocial developer status (You must disable the Sandbox mode). This means that you will have to submit your finished gadget through http://www.hyves.nl/api/opensocial/apply/ (Apply for OpenSocial developer). Your gadget should be placed on your profile in your sandbox environment so we can check this here, your profile should be set to a visible state, otherwise we can't see it.
After our check and your gadget follows our Policy and Requirements you should receive an e-mail that confirms your status. Then it is possible to add the gadget to you "Live gadgets". After that you will have a "Itempage" which you can spread around to have the gadget installed (This is not a gallery position by the way).
Note: the live gadgets have a caching of one day on the Hyves servers, the sandbox gadgets don't have any caching enabled.
Play around with example code snippets
We have developed and displayed some examples with different OpenSocial functionalities on the Snippets page, here you can easily copy/paste example code to a XML-file on your own server and adjust this to your wishes.
Tips
- An easy way to test code is the OpenSocial Development Gadget, you can install it here.
- Another easy way to learn making OpenSocial gadgets is by looking at someone else his code. On Hyves you can view this code from the source code of a webpage. An easy tool for this is this bookmarklet (Bookmarks are also know as Favorites).
