@facebook_required(canvas=True)
def canvas(request, graph):
 signed_request_string = request.POST.get('signed_request')
 signed_request = {}
 if signed_request_string:
  signed_request = parse_signed_request(signed_request_string)
 likes = []
 if graph:
  likes = graph.get('me/likes')['data']
 context = {'signed_request': signed_request, 'likes': likes}
 return render(request, 'django_facebook/canvas.html', context)

@ facebook_required ( canvas = True ) def canvas ( request , graph ) : signed_request_string = request . POST . get ( 'signed_request' ) signed_request = { } if signed_request_string : signed_request = parse_signed_request ( signed_request_string ) likes = [ ] if graph : likes = graph . get ( 'me/likes' ) [ 'data' ] context = { 'signed_request' : signed_request , 'likes' : likes } return render ( request , 'django_facebook/canvas.html' , context )
example of a canvas page .