asp.net - Google friend connect - simple question about API and .net variables -
i want store person.field.id number of logged-in person in .aspx .net variable can use in vb script. using sign-in gadget on site. how do this?
check out .net opensocial client library , c# port of chow down.  these 2 alternate methods pulling in gfc id of current viewer in .net, though you'd have translate latter c# vb.net if wanted use it, since it's not shared library.  unfortunately, don't think client library written friend connect in mind, simpler fcauth method isn't available.  you'll have go through 2-legged oauth process.  assume client library supports this, since it's port of java version, does.
if sounds complicated, , need id, might pass simple ajax/xhr call. here's js api call getting id:
var req = opensocial.newdatarequest(); req.add(req.newfetchpersonrequest('viewer'), 'viewer'); req.send(function(response) {   var data = response.get('viewer').getdata();   if (data) {     visitorid = data.getid();     // send id server via ajax/xhr here   } else {     // not logged in     visitorid = null;   } });   update: may interested in project brian clifton released: friendconnect-dotnet
Comments
Post a Comment