Create facebook tab for only my company page

前端 未结 1 594
眼角桃花
眼角桃花 2021-01-19 05:52

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 a

相关标签:
1条回答
  • 2021-01-19 06:47

    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.

    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)

    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.

    0 讨论(0)
提交回复
热议问题