Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rediect facebook app on canvas to mobile web app for mobile users

How can i redirect users coming to my app on facebook (canvas app) to the mobile version of the same..

i know that can be achieved using this

<script type="text/javascript">
<!--
if (screen.width <= 699) {
document.location = "mobile.html";
}
//-->
</script>

But how can i achieve this without putting a redirect code on the link published....

Is there any way by which facebook automatically redirects mobile users coming on canvas app to its mobile web version.....

like image 655
Ramanvir Sodhi Avatar asked Jan 16 '23 23:01

Ramanvir Sodhi


2 Answers

NO need to use the above code ...just also fill in the mobile web url on facebook app setting page. facebook will automatically redirect mobile users (iphone, ipad and other smartphone users) to your mobile website instead of canvas ...

like image 134
Ramanvir Sodhi Avatar answered Jan 31 '23 08:01

Ramanvir Sodhi


I'm also trying to work out how to do this, but I found a neat tutorial on the Facebook developers channel that might point you in the right direction.

http://developers.facebook.com/docs/mobile/web/build/

like image 42
JBagley Avatar answered Jan 31 '23 10:01

JBagley