I have an app in facebook, and I want to use this very same system on a different app as well. I have all data stored in a database (appid, appsecret, pageid etc), but if I load the app in facebook, I can't figure out what appid the current app is.
For example: When I visit app_1234567890123456, my app has to figure out like "hey, this is app with ID 1234567890123456, let's see if I have that one in my database"
But now my app is more like "wtf? I really have no clue what all of this is".
I know facebook has this thing $facebook->getAppId, but in order to do that, I need to connect with facebook with an app secret and an appid, and those are 2 things I don't know at that moment. I can only make the connection with facebook if I know the appID from the current url.