Posting User Activity - iframe approach

1 view
Skip to first unread message

ajit

unread,
May 10, 2008, 2:48:57 AM5/10/08
to Orkut Developer Forum
Hi Jason,

Through my application I need to post a user activity.In the xml
file I am creating a iframe...and inside that iframe i am loading a
content.....whenever a user performs a action i need to post that
activity.....The problem here is I am not able to call opensocial
functions in other pages(inside iframe)...only while loading the
application, i can call...how to use opensocial functions in other
pages as well....please help me in this regard.....

Jason

unread,
May 12, 2008, 6:10:05 PM5/12/08
to Orkut Developer Forum
This is tricky. Unfortunately, the flexibility you gain by building an
IFrame-based application is offset by the lack of OpenSocial
integration. Since the browser's security policy prevents two pages
running on separate domains from accessing each other's DOM directly,
I don't know a clever way of accomplishing this. Technically, the
gadgets library includes an RPC mechanism, but this is slow and not
well documented since its built for container developers, not
individual applications.

In general, we discourage app developers from building apps in this
fashion because it limits what their apps are able to do. This is one
example. Another is the difficulty in getting friend data into the
frame's source due to limitations on URL length. If activity posting
is a must, I suggest retooling your application to run outside of an
IFrame or, alternatively, waiting for the REST API, which is nearing.

- Jason
Reply all
Reply to author
Forward
0 new messages