function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ghostdevghostdev 

Handling events between a canvas app and lightning app

Greeting to everyone,

i have a canvas app which code is written in php/js and deployed on heroku; it has a Signed Request POST method for auth and full access permission; It also has a published event when i perform a click in a situation (e.g "Click here to fire a string with publisher").
When i used salesforce classic, i embedded the canvas in a visualforce page and i subscribed to the canvas event successfully, passing parameters to canvas in easy way.
Now i switched to Lightning because of business needs and i have a lightning app in which i add a lightning component with the canvas inside it (force:canvasApp tag). So i have some questions to ask:
1. is there an easy way to subscribe the lightning app to the canvas event (i used Sfdc.canvas.client.publish in canvas app) to handling communications between canvas app and lightning page ?
2. is there an easy way to pass parameters at canvas app like in visualforce pages (e.g. params="{! $User.fullName}") ?
3. is the approach -- canvas app IN lightning custom component IN lightning app -- correct ?
ghostdevghostdev
Tthanks to all those wish to participate