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
anjin reddy 9anjin reddy 9 

Canvos Integration

Hi Friends,
 Please sugest me about below Queries.
1)Any can explain me about Canvos integration and I-frames
2)What is use of Canvos Integration
3)With Some Examples
4)Along with this please provide  how to integrated into Visualforcepages using Canvos Integration ,I frames

1. & 2 Canvas enables you to easily integrate a third-party application in Salesforce. Canvas is a set of tools and JavaScript APIs that you can use to expose an application as a canvas app. This means you can take your new or existing applications and make them available to your users as part of their Salesforce experience.
Canvas apps can use the OAuth 2.0 protocol to authenticate and acquire access tokens for Integration.
<%@ page import="canvas.SignedRequest" %>
<%@ page import="java.util.Map" %>
// Pull the signed request out of the request body and verify and decode it.
Map<String, String[]> parameters = request.getParameterMap();
String[] signedRequest = parameters.get("signed_request");
if (signedRequest == null) {%>
This app must be invoked via a signed request!<%
String yourConsumerSecret=System.getenv("CANVAS_CONSUMER_SECRET");
String signedRequestJson = SignedRequest.verifyAndDecodeAsJson(signedRequest[0],
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="" lang="en">
<title>Hello World Canvas Example</title>
Quick Start—Advanced Create the Canvas App
<link rel="stylesheet" type="text/css" href="/sdk/css/connect.css" />
<script type="text/javascript" src="/sdk/js/canvas-all.js"></script>
<!-- Third part libraries, substitute with your own -->
<script type="text/javascript" src="/scripts/json2.js"></script>
if (self === top) {
// Not in an iFrame.
alert("This canvas app must be included within an iFrame");
Sfdc.canvas(function() {
var sr = JSON.parse('<%=signedRequestJson%>');
Sfdc.canvas.byId('username').innerHTML = sr.context.user.fullName;
<h1>Hello <span id='username'></span></h1>

4. Here is the proper steps and instruction to create canvas integration

Sandeep Singhal