仅为我的公司页面创建 facebook 标签 [英] Create facebook tab for only my company page

查看:13
本文介绍了仅为我的公司页面创建 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 语句,并决定如果请求来自您不希望安装应用程序的页面,则不显示任何内容(或一些通用内容).

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 标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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