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
Post a Comment