I am trying to use Lightning out to show a lightning app in a html page. Following is the code snippet in my html page -
$Lightning.use([AppName], function() {
$Lightning.createComponent("[ComponentName]", {}, [iframe], function(cmp) {});
}, [InstanceURL], [OAuthKey]);
In the Lightning App, I create the application which 'extends="ltng:outApp"' and specify the dependency for the component as
<aura:dependency resource="[Component Name"/>
I could not get this to work as I get a 500 Server error for the Lightning app url- http://[domainname-sandbox].cs62.my.salesforce.com/c/[lightningApp].app?aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT
Could anyone get Lightning out to work on a html page?