Title: AHWEBDEV's Replies - page 5 | WordPress.org

---

# AHWEBDEV

  [  ](https://wordpress.org/support/users/ahwebdev/)

 *   [Profile](https://wordpress.org/support/users/ahwebdev/)
 *   [Topics Started](https://wordpress.org/support/users/ahwebdev/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ahwebdev/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ahwebdev/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ahwebdev/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ahwebdev/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ahwebdev/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 61 through 75 (of 504 total)

[←](https://wordpress.org/support/users/ahwebdev/replies/page/4/?output_format=md)
[1](https://wordpress.org/support/users/ahwebdev/replies/?output_format=md) [2](https://wordpress.org/support/users/ahwebdev/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/ahwebdev/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/ahwebdev/replies/page/4/?output_format=md)
5 [6](https://wordpress.org/support/users/ahwebdev/replies/page/6/?output_format=md)…
[32](https://wordpress.org/support/users/ahwebdev/replies/page/32/?output_format=md)
[33](https://wordpress.org/support/users/ahwebdev/replies/page/33/?output_format=md)
[34](https://wordpress.org/support/users/ahwebdev/replies/page/34/?output_format=md)
[→](https://wordpress.org/support/users/ahwebdev/replies/page/6/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] Facebook AWD Error: (#2500)](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/page/2/#post-3040805)
 * Hi, I fixed the login button with good values and names.
 * the file to replace is in plugins/facebook-awd/inc/admin/forms/login_bitton.php
 * This will repair the login button redirect url.
 * Dowload the file here and replace the old one.
    [https://gist.github.com/3724003](https://gist.github.com/3724003)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] Facebook AWD Error: (#2500)](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/page/2/#post-3040804)
 * > However, I noticed that it does change the logout button generated by your 
   > plugin.
   >  The button name is now the “after logout url” I entered in plugin 
   > settings (before it was just the word “Logout”). The button code is now: `<
   > a href="https://www.facebook.com/logout.php?next=http://mytestdomain.com/facebook-
   > awd/logout?redirect_to=http://mytestdomain.com/users/?action=login&_wpnonce
   > =b69d42fb25&access_token=AAAEvn...">http://mytestdomain.com/my-board</a>`
   > Please notice that redirect_to has value I entered in “Url after login” in 
   > plugin settings. And the anchor tag content is: [http://mytestdomain.com/my-board](http://mytestdomain.com/my-board)
   > which is url which I entered “Url after logout” plugin settings.
 * OK i note that to fix it. i must verify the name of variable beteween url after
   logout and url after login.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] Facebook AWD Error: (#2500)](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/#post-3040786)
 * Hi,
 * > If I’m logged out from WP it signs me back in after I sign in to Facebook. 
   > Is this desired behavior?
 * Yes as you already authorized the app
 * You re right, the is_user_logged_in_facebook() is broken. however, using the /
   me api call will increase the page loading on each page.
 * >  For the bug I mentioned before (log out redirect url used as a label and log
   > in url used in log out redirection) I’ll create another thread.
 * thank you, i will follow that.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] V1.4 issues](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-v14-issues/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-v14-issues/page/2/#post-3037731)
 * Ok i see what’s wrong, I will fix it, and send you testing code. thanks for report
   and help.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] Facebook AWD Error: (#2500)](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/#post-3040677)
 * OK so i decoded the url and that give that:
    [https://www.facebook.com/logout.php?next=http://mytestdomain.com/facebook-awd/logout?redirect_to=index.php&_wpnonce=b69d42fb25&access_token=AAAEvnD4aoZAgBAGZCRiuSxKHxrrmuAZBZAN8GUm4PGAm28WZBxpEAdoXL0esv1ZCrkZC2y6my8en6xB6IJlaJXAOzdNySFc2AnxcezoO2or9wZDZD](https://www.facebook.com/logout.php?next=http://mytestdomain.com/facebook-awd/logout?redirect_to=index.php&_wpnonce=b69d42fb25&access_token=AAAEvnD4aoZAgBAGZCRiuSxKHxrrmuAZBZAN8GUm4PGAm28WZBxpEAdoXL0esv1ZCrkZC2y6my8en6xB6IJlaJXAOzdNySFc2AnxcezoO2or9wZDZD)
 * the strange thing is that **redirect_to=index.php** normaly, this should redirect
   to an url on your site.
 * I explain:
 * When you logout, first we redirect you on facebook to clear facebook session,
   then facebook redirect you to an special url on your site to clear WP session,
   then it will redirect you to the url after logout.
 * Did you set an url for redirect after login ? It seems this is the problem, as
   this url is set to “index.php” it’s not a good url
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] Facebook AWD Error: (#2500)](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/#post-3040675)
 * Can you give me the url to logout on your site when your are FB connected ?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] V1.4 issues](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-v14-issues/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-v14-issues/#post-3037726)
 * Ok and the folder of the 1.4.1 is named “facebook-awd” ? this is important…
 * So after activation did you see difference ?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] Facebook AWD Error: (#2500)](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/#post-3040664)
 * What is your browser ? i need an url to test, as i can’t reproduce the bug.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] V1.4 issues](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-v14-issues/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-v14-issues/#post-3037723)
 * Can you try to download the version from gitHub ? i update some line of code…
   
   [https://github.com/AHWEBDEV/Facebook-AWD](https://github.com/AHWEBDEV/Facebook-AWD)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] Facebook AWD Error: (#2500)](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-facebook-awd-error-2500/#post-3040660)
 * Can you give me more info ? i need to know where this error happens ?
    Wich line
   of code can you paste the full error report here ? thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] V1.4 issues](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-v14-issues/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-v14-issues/#post-3037698)
 * Are you both using html5 or xfbml buttons ?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] WordPress as "App on Facebook"](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-wordpress-as-app-on-facebook/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-wordpress-as-app-on-facebook/#post-3039532)
 * So this one !
 *     ```
       function force_fb_login()
       {
   
       	//access to the Facebook AWD object
       	global $AWD_facebook;
       	//define the app url and the redirect after login
       	$redirect_uri = 'https://apps.facebook.com/'.$AWD_facebook->options['app_infos']['namespace'].'/?redirect_to=' . $AWD_facebook->get_current_url();
       	$scope = $AWD_facebook->options["perms"];
       	$login_options = array(
       		'scope' => $scope,
       		'redirect_uri' => $redirect_uri
       	);
       	//Check if the user is logged in with Facebook, if no, redirect him to the Facebook login page.
       	if (!is_user_logged_in()) {
       		echo '<script>top.location.href="'.$AWD_facebook->fcbk->getLoginUrl($login_options).'";</script>';
       		exit();
       	}
       }
       add_action('wp_head', 'force_fb_login');
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] WordPress as "App on Facebook"](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-wordpress-as-app-on-facebook/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-wordpress-as-app-on-facebook/#post-3039529)
 * Ok, i know why, when the file functions.php is read, the $AWD_facebook is not
   yet an object.
    However i saw that in the code the redirect url of this function
   after the login will be your website url, not the fb app url.
 * So I wrote a little hack, in wait of a new version of the plugin.
 *     ```
       function force_fb_login()
       {
       	//access to the Facebook AWD object
       	global $AWD_facebook;
       	//define the app url and the redirect after login
       	$redirect_uri = $AWD_facebook->options['app_infos']['link'] . (get_option('permalink_structure') != '' ? '?' : '&') . 'redirect_to=' . $AWD_facebook->get_current_url();
       	$scope = $AWD_facebook->options["perms"];
       	$login_options = array(
       		'scope' => $scope,
       		'redirect_uri' => $redirect_uri
       	);
       	//Check if the user is logged in with Facebook, if no, redirect him to the Facebook login page.
       	if (!is_user_logged_in()) {
       		echo '<script>top.location.href="'.$AWD_facebook->fcbk->getLoginUrl($login_options).'";</script>';
       		exit();
       	}
       }
       add_action('wp_head', 'force_fb_login');
       ```
   
 * I tested it, and it works great in app canvas !
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] V1.4 issues](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-v14-issues/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-v14-issues/#post-3037670)
 * > Reference issue
   >  Can’t find variable: FB”
 * You get that only on the login page no ? in admin too ?
    Social plugin should
   works. look here [http://www.ahwebdev.fr](http://www.ahwebdev.fr) it uses the
   1.4 and fb plugins are working.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Facebook AWD All in one] [Plugin: Facebook AWD All in one] WordPress as "App on Facebook"](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-wordpress-as-app-on-facebook/)
 *  Plugin Author [AHWEBDEV](https://wordpress.org/support/users/ahwebdev/)
 * (@ahwebdev)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-wordpress-as-app-on-facebook/#post-3039500)
 * If it works, you can use write it with less code…
 *     ```
       global $AWD_facebook;
       add_action('init', array($AWD_facebook, 'login_required');
       ```
   
 * In fact i am not sure this will work, because the redirect is set to the current
   url. but in an app canvas the current url is the app page, but for the plugin
   the current url is the WP url.
 * Try it, and tell me.

Viewing 15 replies - 61 through 75 (of 504 total)

[←](https://wordpress.org/support/users/ahwebdev/replies/page/4/?output_format=md)
[1](https://wordpress.org/support/users/ahwebdev/replies/?output_format=md) [2](https://wordpress.org/support/users/ahwebdev/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/ahwebdev/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/ahwebdev/replies/page/4/?output_format=md)
5 [6](https://wordpress.org/support/users/ahwebdev/replies/page/6/?output_format=md)…
[32](https://wordpress.org/support/users/ahwebdev/replies/page/32/?output_format=md)
[33](https://wordpress.org/support/users/ahwebdev/replies/page/33/?output_format=md)
[34](https://wordpress.org/support/users/ahwebdev/replies/page/34/?output_format=md)
[→](https://wordpress.org/support/users/ahwebdev/replies/page/6/?output_format=md)