Skip to content

Instantly share code, notes, and snippets.

@dvdsmpsn
Created October 1, 2012 23:45
Show Gist options
  • Save dvdsmpsn/3815232 to your computer and use it in GitHub Desktop.
Save dvdsmpsn/3815232 to your computer and use it in GitHub Desktop.
Jive Apps - get App properties
// require: https://raw.github.com/derek-watson/jsUri/master/Uri.js
osapi.http.get({'href' : 'http://market.apps.jivesoftware.com/',
nocache: 'true',
'authz': 'signed'}).execute(
function(r) {
var uri = new Uri(r.headers.location);
var oo_id = unescape(uri.getQueryParamValue('opensocial_owner_id'));
var jiveUserId = oo_id.split('@')[0];
console.debug(' +++ jiveUserId: ' + jiveUserId);
var jiveInstanceId = oo_id.split('@')[1];
console.debug(' +++ jiveInstanceId: ' + jiveInstanceId);
var jiveAppId = uri.getQueryParamValue('opensocial_app_id');
console.debug(' +++ jiveAppId: ' + jiveAppId);
var jiveAppUrl = uri.getQueryParamValue('opensocial_app_url');
console.debug(' +++ jiveAppUrl: ' + unescape(jiveAppUrl));
var jiveAppConsumerKey = uri.getQueryParamValue('oauth_consumer_key');
console.debug(' +++ jiveAppConsumerKey: ' + jiveAppConsumerKey);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment