How to Install App from sharepoint hosted app to sub sites+javascript
문제
I need to install my sharepoint app from root site to other sub sites programmatically using javascript. but my installation function doesn't work:
function InstallApp()
{
var context = new SP.ClientContext(appweburl);
var factory = new SP.ProxyWebRequestExecutorFactory(appweburl);
context.set_webRequestExecutorFactory(factory);
var installContext = new SP.AppContextSite(context, hostweburl + '/subSite');
var installWeb = installContext.get_web();
var appFile = installWeb.getFileByServerRelativeUrl('/SiteAssets/myAppFile.app');
installWeb.loadAndInstallApp(appFile);
installWeb.update();
installContext.get_context().load(installWeb);
installContext.get_context().executeQueryAsync(onInstallSuccess, OnFailure);
}
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow