My app is my website so I used to put this code in my canvas page so I redirect my users to my website :
<fb:redirect url="http://www.mywebsite.com/" />
but since fbml has been deprecated and will not be supported anymore soon I need to use another method to redirect my users .. is the following code the best I can do or there is another way?
<script type='text/javascript'>top.location.href = 'http://www.mywebsite.com/';</script>
That's right. You can only do a top.location since you are inside an iframe. See more here: Redirect from Facebook canvas page to website