移动网址和signed_request [英] Mobile Web URL and the signed_request

查看:126
本文介绍了移动网址和signed_request的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了我的FB应用程序,以便它具有一个移动Web URL组件。我从测试中注意到,每当我在移动设备上导航到我的应用的画布网址时,Facebook会自动将移动设备重定向到定义的移动网址。



如果我从桌面执行相同操作,画布URL被加载到浏览器中。换句话说,如果FB在导航到应用程序的画布网址时检测到移动设备,它将立即重定向到定义的移动网址,而不是加载画布网址内容。



这样做的问题是,当画布URL加载时,FB会向其传递一个signed_request表单参数。然而,当它重定向到移动网址时,它不会。



我注意到,当检查网络嗅探器时,手机上的Facebook将app.facebook.com的URL重定向到m.facebook.com,也许这个signed_request可能会一路走来。但是,当检查画布网址的第一次调用时,也没有signed_request。



这就像Facebook在处理画布网址时只提供signed_request,在这种情况下有没有人有任何关于如何获得signed_request的见解或建议?/ p>

我目前唯一的想法是迫使用户在移动应用程序被重定向后立即授权,但如果可能,我宁愿不这样做(我不是门控技术的粉丝)



干杯



Lee



---编辑---

关闭 - 看到我的答案。

解决方案

结论是,移动网址不会收到signed_request,并获得相同类型的数据需要用户通过FB Auth进程。关闭问题。


I've set up my FB app so that it has a Mobile Web URL component. I've noted from testing that whenever I navigate to canvas URL of my app on a mobile device, Facebook automatically redirects the mobile to the defined Mobile Web URL.

If I do the same from desktop, the canvas URL is loaded in to the browser. In other words, if FB detects a mobile device when navigating to an app's canvas URL, it will immediately redirect to a defined Mobile Web URL and not load the canvas URL content.

The problem with this is that when the canvas URL loads, FB passes to it a signed_request form parameter. Yet, when it redirects to the Mobile Web URL it does not.

I noticed when checking a network sniffer that when on mobile Facebook redirects the app.facebook.com URL to m.facebook.com, and thought perhaps the signed_request was getting lost along the way. But when checking the first call to the canvas URL there was no signed_request there either.

It's like Facebook only provides the signed_request when it processes the canvas URL, which in the case of mobile is never.

Has anyone any insight or advice on how to get the signed_request? My only thought at the moment is forcing the user to authorise the app on mobile as soon as they are redirected, but i'd rather not do that if possible (I'm not a fan of gating techniques)

Cheers

Lee

--- EDIT ---

Closing - see my answer.

解决方案

I've since come to the conclusion that Mobile URLs do not receive the signed_request, and to get the same sort of data requires the users to be put through the FB Auth process. Closing the question.

这篇关于移动网址和signed_request的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆