Any Post related Opensocial Remote Access..?

8 views
Skip to first unread message

KC Jagadeep

unread,
Aug 14, 2008, 12:56:43 PM8/14/08
to Orkut Developer Forum
I like to know more about Opensocial Remote access.. !

My need is.
want to accees friends[ All open socila fields ] details on a ASP.Net
[VB/C#] page.. With out using Javascript!

any post related or any article or any reff ?

thanks

kcjagadeep

André Diniz

unread,
Aug 14, 2008, 3:52:10 PM8/14/08
to Orkut Developer Forum
Hi Jagadeep!

Take a look in makeRequest method to change datas, following a link:

http://code.google.com/apis/opensocial/docs/0.7/devguide.html#Remote_Content

Cheers,

André Diniz
Enquete Fácil - Owner

Jagadeep KC

unread,
Aug 14, 2008, 4:54:50 PM8/14/08
to opensoci...@googlegroups.com
Hai  Arne,

Thanks that I will try,

And i am using IFRAME tage to display the page from my URL..
and also i am using the Java Scripts for getting friends details.. but
how can i integrate it..
where I have to use Javascrips inside the IFRAME or Out side the
IFRAME .
I tried both.. but not getting outputs..

that same coed working with xml.. I want to get access the pictures
from outside url..
and do activity with friends details..

this process should do with out Javascript,  In VB/C#..

Hope u understood my question.. ?

regards
kcjagadeep
--
"How you do a thing is more important than what you do." —Amma

Jason

unread,
Aug 18, 2008, 5:39:37 PM8/18/08
to Orkut Developer Forum
You have several options here:

1. The easiest option is to request all of the data that you'll need
(name, ID, friends, etc.) and set the IFrame's URL dynamically,
passing the data as URL arguments to the IFrame's source URL. This
approach is flawed in several respects, however. First, URLs are
length-constrained. If a user has a large number of friends, you won't
be able to pass all of their information to your ASP.NET page. Second,
even if you are able to pass this information to your ASP.NET page,
you are limited in your interaction with the OpenSocial API. For
example, you won't be able to create a new orkut update in response to
an interaction within the IFrame.

2. A REST-based OpenSocial API is coming very shortly which will allow
you to access all of a user's information in just about any language
you please. It has been a long time coming but it is just about ready,
so you may want to wait for this.

3. A gadgets.rpc library is available for making remote procedure
calls to any given container, enabling you to define JavaScript
functions in your XML spec that can be triggered from within your
ASP.NET page. Unfortunately, there isn't very much documentation on
this although we hope to release an article on the wiki soon.

Please let me know if you have any questions on any of the methods
I've proposed above.

- Jason

On Aug 14, 1:54 pm, "Jagadeep KC" <kcjagad...@gmail.com> wrote:
> Hai  Arne,
>
> Thanks that I will try,
>
> And i am using IFRAME tage to display the page from my URL..
> and also i am using the Java Scripts for getting friends details.. but
> how can i integrate it..
> where I have to use Javascrips inside the IFRAME or Out side the
> IFRAME .
> I tried both.. but not getting outputs..
>
> that same coed working with xml.. I want to get access the pictures
> from outside url..
> and do activity with friends details..
>
> this process should do with out Javascript,  In VB/C#..
>
> Hope u understood my question.. ?
>
> regards
> kcjagadeep
>
> On Fri, Aug 15, 2008 at 1:22 AM, André Diniz <adi...@gmail.com> wrote:
>
> > Hi Jagadeep!
>
> > Take a look in makeRequest method to change datas, following a link:
>
> >http://code.google.com/apis/opensocial/docs/0.7/devguide.html#Remote_...

Jagadeep KC

unread,
Aug 18, 2008, 7:51:54 PM8/18/08
to opensoci...@googlegroups.com
Dear Jason,
Thanks,
 
ASP.Net Tools avilable for other Opensocial website.. is sandbox have any ? and I would like to get details  for "....IFrame's URL dynamically, passing the data as URL arguments..." hope it can be impliment only on pagelode_event and not in any other event..?
 
regards
kcjagadeep
 

Jason

unread,
Aug 20, 2008, 1:45:08 PM8/20/08
to Orkut Developer Forum
Can you link me to the ASP.NET tools you mentioned? I'm not familiar
with any ASP-specific OpenSocial resources that can help you achieve
what you're after.

As far as the dynamic IFrame URL solution I proposed above, it works a
bit like this:

1. Declare an IFrame in your Content element: <iframe id="appFrame"></
iframe>

2. Declare an on-load handler that requests any data you want to
display inside of your app:

gadgets.util.registerOnLoadHandler(onLoad);
function onLoad() {
var req = opensocial.newDataRequest();

req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER),
'owner');
req.send(callback);
};

3. In the callback function, set the source URL of the IFrame, passing
in the data you want to display as a URL argument. For example, in the
callback below, I've passed the owner's name through the URL, and your
ASP.NET page can then get this name and display it as it builds the
page that gets rendered.

function callback(data) {
var owner = data.get('owner').getData();
var appFrame = document.getElementById('appFrame');

if (owner) {
appFrame.src = 'http://www.mydomain.com/app.aspx?ownerName=' +
encodeURIComponent(owner.getDisplayName);
}
};

Keep in mind that this should work fine for data where the length is
generally known (e.g. the name which typically won't exceed 25
characters), but this isn't a good approach if you want to display the
user's friends since you won't be able to fit 100 friend names in the
URL and having several hundred friends is not uncommon.

I hope this helps -- let me know if you have more questions on this.

- Jason

On Aug 18, 4:51 pm, "Jagadeep KC" <kcjagad...@gmail.com> wrote:
> Dear Jason,
> Thanks,
>
> ASP.Net Tools avilable for other Opensocial website.. is sandbox have any ?
> and I would like to get details  for "....IFrame's URL dynamically, passing
> the data as URL arguments..." hope it can be impliment only on
> pagelode_event and not in any other event..?
>
> regards
> kcjagadeep
>
Reply all
Reply to author
Forward
0 new messages