oneNiceFriend
oneNiceFriend

Reputation: 6891

Force to open social apps by redirecting page in c# in smart phone and tablet

This is the scenario : The user will go to mydomain.com with a smart phone or tablet

and mydomain.com will be redirected to facebook.com/mypage

It works but doesnt fire the Facebook app. I want Facebook app opens when user goes to my site.

If the user directly goes to facebook.com/mypage, It opens Facebook App. But why not with my redirection...

I have tried...

        Response.Status = "301 Moved Permanently";
        Response.AddHeader("Location", "http://www.facebook.com/mypage");
        Response.End();

and

         Response.BufferOutput = true;
         Response.Redirect("http://www.facebook.com/mypage");

But none of the works. What can be the trick here?

Upvotes: 0

Views: 808

Answers (1)

Ben J. Boyle
Ben J. Boyle

Reputation: 306

You'll need to use the Facebook URL schema to open the app. See this previous post for an example: Facebook URL schemes on a mobile website, open app if its installed, otherwise go to the webpage

Essentially, the device recognizes that URIs on the "fb" protocol should open in the app.

Upvotes: 1

Related Questions