通过在智能 phone 和平板电脑中重定向 c# 中的页面强制打开社交应用程序

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

情况如下:用户将使用智能 phone 或平板电脑

前往 mydomain.com

和 mydomain.com 将被重定向到 facebook。com/mypage

它可以工作,但不会启动 Facebook 应用程序。我希望用户访问我的网站时打开 Facebook 应用程序。

如果用户直接去facebook。com/mypage,它打开Facebook App。但是为什么不使用我的重定向...

我试过了...

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

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

不过none的作品。这里有什么诀窍?

您需要使用 Facebook URL 架构来打开应用程序。有关示例,请参见之前的 post:Facebook URL schemes on a mobile website, open app if its installed, otherwise go to the webpage

基本上,设备会识别 "fb" 协议上的 URI 应该在应用程序中打开。