Created
October 1, 2012 23:45
-
-
Save dvdsmpsn/3815232 to your computer and use it in GitHub Desktop.
Jive Apps - get App properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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