I’m developing my first Facebook app in PHP and was wondering if the page on Facebook that it’s being viewed in can be detected by the app. I’m planning on displaying the app on several different pages and want the app to display something different for each of the pages. This way I would only the need the user to accept the permissions for one central app instead of several different ones.
Share
Yes. There is
signed_request(POST), with Page ID… You cannot get entire URL because request is going trough Facebook proxy. Here is the way how you can do it, later just serve content based on Page ID…(this is just the part of my class)
edit:
Like you have said, you need to authorize app only once per user, and you will be able to use it across all pages (I have hundreds of them). This is output of signed_request when user is “connected” to app.
You can see page->id, a user_id, also you will get token for accessing user info (for those you have permission).