应用程序尚未在iPad上配置其移动Web URL或URL facebook错误

时间:2014-04-25 08:53:47

标签: ios facebook ipad facebook-apps

我目前正在运行Facebook应用程序。通过PHP使用Mobile Detect会将任何移动设备或平板电脑设备重定向到应用程序的直接链接,而不是Page Tab应用程序。

if ($detect->isMobile() || $detect->isTablet()) {
    header("Location: https://[domain].com/facebook/[app]/");
} else{ 
   header("Location: https://www.facebook.com/[page-app]");
}

除了iPad之外,它在所有设备上都能正常工作。通过iPad,我收到了这个错误:

Either this application has not configured its Mobile Web URL or the URL could not be verified as owned by the application. Unable to redirect.

在应用设置上,我设置了App on FacebookPage Tab个平台。没有添加Website平台。我认为添加这个可以解决这个问题但是在提供URL之后,同样的错误也开始出现在移动设备上。

我不确定是否有人遇到过这个问题。

更新

这种情况发生在iOS上,只在Facebook应用上发生。在iPhone或iPad浏览器上进行测试可以完全没有问题。

更新2

所以这在iOS Facebook应用程序内浏览器中发生,我现在想要找到的是,是否有某种方法迫使Facebook在浏览器而不是应用内浏览器中打开链接。

类似的问题:

1 个答案:

答案 0 :(得分:0)

我在调用redirect_uri时删除了getLoginUrl,从而解决了这个问题。该应用程序将通过jQuery重定向用户并调用Mobile Detect。如果用户未在移动设备或平板电脑设备上使用该应用,则会将用户重定向到Facebook Page应用。

jQuery的:

function get_mobiledetect() {
    jQuery.ajax({
        url: "[URL]/get_mobiledetect.php",
        type: "post",
        success: function(data) {
            var mobile_detect = JSON.parse(data);
            if (!mobile_detect.isMobile && !mobile_detect.isTablet) {
                if (top === self) {
                     window.location.href = [Facebook Page app URL];
                }
            }
        },
        error: function() {
             /* handle error */
        }
     })
 }

移动侦测:

include 'libs/Mobile_Detect.php';

$detect = new Mobile_Detect();

echo json_encode(array(
        "isMobile" => $detect->isMobile(),
        "isTablet" => $detect->isTablet()
    )
);