简体   繁体   English

Facebook Connect - 移动版

[英]Facebook Connect - Mobile

I am currently in the process of creating a mobile version of my web app. 我目前正在创建我的网络应用程序的移动版本。 The app is being developed with Facebook's PHP Client Library. 该应用程序正在使用Facebook的PHP客户端库进行开发。

The issue: 问题:

I am using the following mobile url to allow users to log in using the mobile devices: http://m.facebook.com/tos.php?api_key=APIKEY&v=1.0&next=http%3A%2F%2Ftweelay.net%2Fm.php&cancel=http%3A%2F%2Ftweelay.net%2Fm.php 我使用以下移动网址允许用户使用移动设备登录: http//m.facebook.com/tos.php?api_key = APIKEY&v = 1.0&next = http%3A%2F%2Ftweelay.net%2Fm .PHP&取消= HTTP%3A%2F%2Ftweelay.net%2Fm.php

APIKEY being my app's actual Facebook API key. APIKEY是我的应用程序的实际Facebook API密钥。

In the url I am telling Facebook to redirect the user back to http://tweelay.net/m.php when the user signs in or clicks cancel on the log in screen. 在网址中,当用户登录或点击登录屏幕上的取消时,我告诉Facebook将用户重定向回http://tweelay.net/m.php I am pulling my hair trying to figure out why it keeps sending the user to http://m.tweelay.net/m.php which is currently an invalid end point. 我正在拉我的头发试图弄清楚为什么它一直将用户发送到http://m.tweelay.net/m.php ,这是目前无效的终点。

I have gone through all of my app's settings on Facebook and I cant find any that reference http://m.tweelay.net and going through all of my source code I cant find any that reference the m. 我已经浏览了我在Facebook上的所有应用程序设置,我无法找到任何参考http://m.tweelay.net并浏览我的所有源代码我找不到任何引用m. sub-domain either. 子域名。

Any ideas? 有任何想法吗? Is there a setting I'm missing? 我缺少一个设置吗? Maybe a Flag in the library? 也许图书馆里有一面旗帜?

I've seen Facebook do this when detecting the mobile browser type and also sometimes randomly through Firefox (it can also happen when trying to get to facebook.com). 我已经看到Facebook在检测移动浏览器类型时执行此操作,有时也会随机通过Firefox(在尝试访问facebook.com时也会发生这种情况)。 I've managed to reset it sometimes, but it's not a guaranteed fix. 我有时设法重置它,但它不是一个保证修复。

If you want to be sure the user makes it to your correct site I suggest creating the subdomain and redirecting traffic to your usual site, it's what I did and now I don't worry about it reverting back. 如果你想确保用户进入正确的网站,我建议创建子域名并将流量重定向到你常用的网站,这就是我所做的,现在我不担心它会恢复原状。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM