php - Is there a way to identify when a facebook application runs through a fanpage page -


lets assume have created facebook app.so who(admin) have facebook fan pages can add app fan page , run app through fan page.i need identify when run app through fan page.
assume index.php file

//index.php  <?php           include_once "fbmain.php";//here facebook authentication parts  ?> <html>     <body>     <form action="http://localhost/test/test.php" method="post">     <input type="submit" value="upload"/><br/>     </form>     </body>    </html> 

when user click "upload" button,'test.php' file loaded.in 'test.php' file i want display id of fan page,

//test.php <?php           echo "hello".$id_of_the_fan_page; ?> //output eg: hello 228276387189141 

can tell me there way this?(i using graph api , php develop app)

when app running page tab, encoded signed_request parameter sent app, includes details page app installed on

see documentation here: https://developers.facebook.com/docs/authentication/signed_request/

there's example of how decode request , obtain relevant fields.

the 'page' field in signed_request includes page id, whether current user likes page, , whether current user admin of page


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -