简体   繁体   English

移动中的Facebook页面应用程序

[英]Facebook page app in mobile

I have few question related to facebook page app. 我有几个与Facebook页面应用程序相关的问题。

I have created facebook page app. 我创建了facebook页面应用程序。 In my facebook page I have added my app as favorite in my page. 在我的Facebook页面中,我已将我的应用程序添加为我的页面中的收藏夹。 So through desktop browser everyone can easily access it. 因此,通过桌面浏览器,每个人都可以轻松访 But how we can do same thing for facebook page in mobile (app & browser)? 但我们如何才能在移动设备(应用程序和浏览器)中为Facebook页面做同样的事情?

Also, I want to open my app through QR code. 另外,我想通过QR码打开我的应用程序。 It should open inside facebook app if fb app already installed else should open in browser. 它应该在Facebook应用程序内打开,如果已经安装的fb应用程序应该在浏览器中打开。 What is the url should use for QR code. 什么是用于QR码的网址。

I have went through many queries related to this.but many solutions are related to redirecting to pages,not to apps. 我已经经历了许多与此相关的查询。但是许多解决方案与重定向到页面而不是应用程序有关。 I tried these solution by changing parameters to app id. 我通过将参数更改为app id来尝试这些解决方案。 But no improvement on this. 但是没有改进。

Any solutions? 有解决方案吗

This a bit tricky, but for your app to work both on mobile devices and page tabs, must have two platforms, Page Tab and Website . 这有点棘手,但是对于您的应用程序在移动设备和页面选项卡上工作,必须有两个平台, 页面选项卡网站

This picture shows a possible configuration for your app: 此图显示了您的应用的可能配置: Facebook应用程序配置

Now that you've done that, somewhere on your server side you will have to create a gateway, that redirects users based on their browser's user agent (notice that this isn't 100% bullet proof) 现在你已经完成了,在服务器端的某个地方,你将不得不创建一个网关,根据浏览器的用户代理重定向用户(请注意,这不是100%防弹)

You could have something like this https://mydomain.com/gateway 你可能会有这样的https://mydomain.com/gateway

And this will also be the url for your QR code 这也将是您的QR码的网址

And the server code will be something this: 服务器代码将是这样的:

if(user_browser_is_mobile==true)
  header( 'Location: http://mydomain.com/mobile' );
else
  header( 'Location: https://www.facebook.com/YOUR_PAGE_ID?sk=app_YOUR_APP_ID' );

I'm guessing your coding in PHP, if you're using some framework probably they have some function to guess if the user_agent is from a mobile device 我猜你的PHP编码,如果你使用的是一些框架,他们可能会有一些函数来猜测user_agent是否来自移动设备

If your using plain PHP I advise you to download this library that does the trick for you: https://code.google.com/p/php-mobile-detect/ 如果你使用普通的PHP,我建议你下载这个为你提供技巧的库: https//code.google.com/p/php-mobile-detect/

Facebook will help you do the redirection if you use a Canvas App. 如果您使用Canvas应用程序,Facebook将帮助您进行重定向。 Any users who go to your canvas app url will be redirected to the mobile url you have configured in your app settings, you can then set the canvas app to redirect to your page tab for desktop users. 转到您的画布应用网址的所有用户都将被重定向到您在应用设置中配置的移动网址,然后您可以将画布应用设置为重定向到桌面用户的网页标签。

Detailed instructions here: https://stackoverflow.com/a/15860533/121285 详细说明如下: https//stackoverflow.com/a/15860533/121285

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

相关问题 Facebook SDK:在移动Facebook App中找不到Page Tab App返回 - Facebook SDK : Page Tab App returns not found in mobile Facebook App Facebook页面在浏览器而非移动应用程序中打开 - Facebook page opens in browser instead of mobile app Facebook移动网络应用程序:“找不到页面” - Facebook mobile web app: “Page not found” Facebook应用程序页面上的“发送到手机”通知未重定向到Google Play - “Send to mobile” notification on facebook app page does not redirect to Google Play 使用 URL 在移动平台上启动 Facebook 应用程序粉丝页面? - Using a URL to launch a Facebook app fan page on mobile platforms? 无法访问移动设备上的Facebook应用,显示“找不到您请求的页面” - Unable to access Facebook app on mobile, gives “The page you requested was not found” 如何使Facebook App页面在移动设备上可见? - How can I make Facebook App page visible on mobile? 基于Facebook的移动应用程序可以访问用户的FB主页? - Facebook based mobile App to access user's FB main page? Facebook移动应用程序安装广告错误 - 找不到您请求的页面 - Facebook Mobile App Install Ads Error - Page you requested was not found 是否可以深入链接到iOS上的Facebook移动应用程序中的特定页面或位置? - Is it possible to deep link to a specific page or location in the Facebook mobile app on iOS?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM