[Plugin: WPBook] | Excluding a Plugin from Use Inside of FB | Feature Request
-
John (or Dave or Bandon?)
I found the instructions: How do I exclude a plugin from use inside of Facebook or only us a plugin inside of Facebook? (https://wpbook.net/docs/faq/) –
– and I was wondering if it would be possible to include that functionality (those options) directly into the plugin in a future update.
It is completely out of pure laziness that I ask this, but I think it would be a boon to many of us that use this plugin…if it’s possible.
How do I exclude a plugin from use inside of Facebook or only us a plugin inside of Facebook?
You’ll want to go to the your plugin file you wish to exclude/include inside your app and add this to the top of the main file that calls the function.
if (isset($_SERVER[“HTTP_USER_AGENT”])) {
$is_facebook = “false”;
}
if (isset($_GET[‘fb_sig_in_iframe’]) || isset($_GET[‘fb_force_mode’])) {
$is_facebook= “true”;
}if ($is_facebook == “false”) { //make sure the user IS NOT logged into Facebook
//(rest of plugin code)
} //end check to see if user is inside of facebookTo only use a plugin in facebook use
if ($is_facebook == “true”){ //make sure the user IS logged into Facebook
//(rest of plugin code)
} //end check to see if user is inside of facebook
- The topic ‘[Plugin: WPBook] | Excluding a Plugin from Use Inside of FB | Feature Request’ is closed to new replies.