本文介绍了仅为我的公司页面创建facebook选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我已经创建了一个公司页面,并且想要创建一个只能安装在我的页面上的自定义选项卡.我知道如何创建应用并安装自定义标签.如何设置该应用程序,以便只有我可以安装它?谢谢!

I have created a company page and want to create a custom tab that can only be installed on my page. I know how to create apps and install the custom tab. How do I set the app up so only I can install it? Thanks!

推荐答案

对应用程序的页面标签URL"(通过页面"标签加载应用程序时使用的URL)的每个请求都将包含signed_request参数.

Each request made to your app's 'page tab url' (the URL used when the app is loaded via a Page tab) will include a signed_request parameter.

https://developers.facebook.com/docs中解释了对此进行解码的方法/authentication/signed_request/-当您的应用程序加载到页面标签上时,您将始终获得page参数(如果当前用户未授权您的应用程序,则其他参数可能不会显示)大多数页面标签应用都是如此)

The method to decode this is explained at https://developers.facebook.com/docs/authentication/signed_request/ - when your app is loaded on a page tab you'll always get the page parameter (the other parameters may not be present if the current user hasn't authorised your app, which will be the case for most page tab apps)

page参数包括其加载页面的页面ID.然后,您在代码中使用if语句,如果请求来自您不希望安装该应用程序的Page,则决定不显示任何内容(或某些常规内容).

The page parameter includes the Page ID of the Page it's loaded on. You then use an if statement in your code and decide to show nothing (or some generic content) if the request came via a Page you weren't expecting the App to be installed on.

这篇关于仅为我的公司页面创建facebook选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 20:15