Google friend connect - simple question about API and .net variables

I want to save the number of the Person.Field.ID of the registered user in the .aspx.net variable so that I can use it in a VB script. I use a gadget to enter my site. How to do it?

+3
source share
1 answer

Check out the .NET OpenSocial client library and the C # port of Chow Down . These would be two alternative methods for attracting the GFC ID of the current viewer to .NET, although you probably have to translate the latter from C # to VB.NET if you want to use it, since it is not a shared library. Unfortunately, I don't think the client library was written using Friend Connect, so a simpler method fcauthis probably not available. You will have to go through the 2-legged OAuth process . I assume the client library supports this, as it is the port of the Java version that does.

, , , , Ajax/XHR. API- JS 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 the ID to your server via Ajax/XHR here
  } else {
    // Not logged in
    visitorId = null;
  }
});

: , : friendconnect-dotnet

+1

Source: https://habr.com/ru/post/1728822/


All Articles