How to Create OpenSocial Application – Part 6

Contrary to what I thought about Hi5’s approval process, I had terrible experience with Hi5. Entire review process in Hi5 is screwed up. My app did get approved, but after many days of struggle. I submitted my app in Hi5 on July 18th. I got the email from a reviewer in Mexico within a day. He asked me to add a favicon image to the XML file and re-submit it. When I re-submitted the app, it triggered a chain of events that were not pleasant…to put it mildly.

Every time I submitted my app to Hi5, I got the message “Your app is rejected because you have ads in your profile view”. Funny thing is that no one from Hi5 even looked at the app after re-submission. I can see it from my log. Still, these guys reject the app with these weird messages. Of course, there are no ads in the profile view. I don’t have ads even in the canvas view until now. Anyway, I don’t want to bore you with all the details. But, the point is that just be prepared for the vague messages from Hi5 review team when you submit the app to them.

Getting approval from Orkut is not an easy process either. But, Orkut review team gives the clear message about what needs to be done to get it approved. You will get a lot of help from opensocial group in google. If you submit the app to Orkut, but haven’t heard anything for more than a week, send an email to opensocial-app-feedback at google dot com; It took me two weeks to get the app approved in Orkut. According to the frequent discussions in opensocial groups, two weeks seems to be the normal waiting time in Orkut.

Let us look at some tips and tricks before we wind up this blog series.

When you design the app, make sure that it has some benefits for the users of the container you target. If your app just reproduces your web site content, your app may not get the approval. Your app should use at least some of the opensocial APIs.

Try to use html as the content-type. If you use url as the content-type, your app may get rejected because it doesn’t utilize the opensocial APIs.

Make sure that the profile view of the app doesn’t show any vertical/horizontal scroll bars. You can use gadgets.window.adjustHeight() to prevent the vertical scrollbar in the profile view.

If you want to implement multiple pages in your application’s canvas, you can pass the arguments in the query string using up_path parm. For example, compose a URL with the format “http://sandbox.orkut.com/Application.aspx?appId=&up_path=help” to display your help content. Inside your app, you can check _args()[“up_path”] to get the value of up_path and decide which page to show. When you click this hyperlink, there is a possibility that it would create another full window (including the left navigation bar) inside the existing page. If that happens, add target=”_top” to the hyperlink, that would fix it. Thanks to Arne Roomann-Kurrik for this tip.

When you start the development for opensocial application, the concept of owner and viewer may confuse you. If that happens, read Opensocial developer guide.

Orkut provides two ids for each user: Opensocial id and profile id. It’s better to store both ids in your database. If you use the same data table for multiple opensocial containers, prefix the opensocial id with the container network. For example, opensocial id from Orkut can be stored as orkut:999999999, opensocial id from Myspace can be stored as myspace:999999999 and so on. This will prevent any kind of duplicate id issues when you port your app to other containers.

If you want to use sessions in your server side code, you will be surprised (may be shocked) to see that your app session fails in IE. Sessions will work fine in Firefox. But, it will not work in IE because of default privacy setting in IE. Internet Explorer does not allow sharing cookies between domains. Check out the post from Gath Adams to see how to fix this. If you use persistence API, you don’t need to worry about session issues because you won’t use any session to store the information.

If you want to use multiple tabs in your app, use gadget tabs.

If you have Orkut specific question, post your question in Orkut developer forum. This forum has good activity, you may get an answer. You can also try chatting with opensocial team in IRC channel (#opensocial) between 1pm and 3pm PST on Tuesdays and Thursdays. The link is irc://irc.freenode.com/opensocial. If you are new to IRC, go to mibbit, select Freenode.net in the pulldown menu, type your nick name, type #opensocial in the channel column and hit “Go”.

Use Firebug to debug your app and Yslow to improve the performance.

Following videos would also be helpful when you start developing the opensocial application. If you find any other resources that helped you with the development, please post it in the comments.

Opensocial developer resources

Google Gadget Editor demo

Good Luck!

Part 1 | 2 | 3 | 4 | 5

Related Posts Plugin for WordPress, Blogger...
Bookmark and Share
Tagged on: , , ,

2 thoughts on “How to Create OpenSocial Application – Part 6

Leave a Reply

Your email address will not be published. Required fields are marked *