Facebook画布应用程序与Facebook移动Web应用程序 [英] Facebook canvas app vs Facebook mobile web app

查看:135
本文介绍了Facebook画布应用程序与Facebook移动Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Facebook画布应用程序和Facebook移动Web应用程序之间的区别感到困惑.这是我困惑的背景.

I'm a bit confused about the difference between a facebook canvas application and a facebook mobile web application. Here is the context of my confusion..

我有一个画布应用程序,让我们将其命名空间称为myfbapp,我基本上可以从 https://apps.facebook访问它. com/myfbapp ,当我登录FB后,它会在Facebook中打开.我在服务器端实现中使用的是Java(apache/tomcat),为简单起见,我们在Web应用程序中仅拥有index.html和authenticationfilter.java(实现Filter).我的index.html中没有任何Facebook特定的Javascript API(没有FB.init()javascript或类似的东西)或代码.每当用户访问我的画布应用程序时,我都会首先向我的Web应用程序发出请求,在此我会获得可用于内部身份验证,会话创建等的signed_request,oauth_token,FB用户ID等.此画布应用程序和一切正常.请注意,当用户访问此应用程序时,我从浏览器到我的应用程序服务器的请求包含了signed_request,user_id等.

I have a canvas application, let us call its namespace as myfbapp, and I basically can access it from https://apps.facebook.com/myfbapp and after I login to FB it opens up with in Facebook. I'm using java (apache / tomcat) for my server side implementation and for simplicity sake let us say I just have an index.html and a authenticationfilter.java (which implements Filter) in my web application. I don't have any Facebook specific Javascript API (no FB.init() javascript or anything like that ) or code in my index.html. Whenever user accesses my canvas application I first get a request to my web application where I get the signed_request , oauth_token , FB user ID etc which I can use for my internal authentication, session creation etc. I have absolutely no issues with this canvas application and every thing works fine. Please note that when user accesses this app the request I get from the browser to my app server has the signed_request , user_id etc.

现在,我也想使该应用程序也可以在移动设备上使用,我想,哦,我要做的就是在同一个myfbapp的Facebook移动网络应用程序部分中添加此应用程序的移动URL.我做到了,并且按预期的方式,当我从我的Android手机登录Facebook myfbapp时,它列在应用程序"部分下,到目前为止一切顺利.当我单击该应用程序时,问题开始.我在我的应用服务器上收到了请求,但其中不包含signed_request,user_id等.我期望移动应用程序与画布应用程序以相同的方式工作,但显然不行,或者我做错了什么.

Now I wanted to make this app available on mobile devices as well and I thought, oh well all I need to do is add the mobile URL for this app in the mobile web app section in Facebook for the same myfbapp. I did that and as expected when I login to facebook from my android phone myfbapp is listed under the apps section, so far so good. The problem starts when I click on the app. I get the request on my app server but it doesn't contain the signed_request , user_id etc.. ????? I was expecting the mobile app to work the same way as the canvas app but apparently it doesn't or I'm doing some thing wrong.

然后,我开始在 http://developers.facebook.com/上阅读有关Facebook移动应用程序的更多信息. docs/guides/mobile/web/#register 讨论在index.html中添加各种Facebook Javascript API(我从未在我的canvas应用程序中做过类似的事情),然后我开始思考,然后可能是移动的Web应用程序更(或完全)像具有FB connect的常规Web应用程序,而不像canvas应用程序(意味着它实际上并未在Facebook中加载),这是真的吗?

Then I started reading more about facebook mobile app at http://developers.facebook.com/docs/guides/mobile/web/#register where it talks about adding various Facebook Javascript API's in the index.html (I never did anything like that in my canvas app) and then I started thinking , may be then mobile web app is more (or exactly) like a regular web app with FB connect and not like canvas application (meaning it doesn't really load with in Facebook) , is this true?

推荐答案

在移动Facebook上,您看不到任何自定义页面/标签.目前,他们显然对此感到不安.

On mobile facebook you can not see any custom pages/tabs. They are apparently wokring on that at the moment.

因此它将与画布应用程序不同.您的移动应用程序将是一个完全独立的网站,而页面不在Facebook的iFrame中.

So it will be different to a canvas app. Your mobile app will be a completely seperate site and page not in an iFrame on Facebook.

这篇关于Facebook画布应用程序与Facebook移动Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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