Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • mmckeen Friend
    #154276

    Whenever I go to an article for the first time, the Facebook Share button and the Facebook Like bar display correctly (as well as the Tweet button). When I refresh the page or go back to that page the Share button is gone and the Facebook Like bar is displayed as just a thin blue bar across the top of the article… has anyone else seen this happen? The Share and Like buttons work because I have been successfully able to do both from the site… I do have my developer ID loaded and I am using the most recent build for JA Social and the plugins …

    Thanks!

    hilfiger Friend
    #355408

    Yes, i had the same problem with 1.0.0 did not test with 1.1.0

    From what i remember the problem was when browsing in mozzila.
    I also know that facebook dosnt let admins (owners of facebook page) to like their own articles? try log in to another acount and test in all browsers.

    mmckeen Friend
    #355508

    Version 1.2 fixes the Like issue but the Share button still disappears…

    Sherlock Friend
    #355580

    <em>@mmckeen 193986 wrote:</em><blockquote>Version 1.2 fixes the Like issue but the Share button still disappears…</blockquote>

    Dear mmckeen,

    For this issue you can try as follow
    Go to the plugins/content/plg_jafacebookshare.php file,Look for this function
    [PHP]
    function onAfterRender(){
    global $mainframe;
    if ($mainframe->isAdmin()) {
    return ”;
    }
    $body = JResponse::getBody();

    //include FBML
    $fbml = $this->getFBML();
    if(!empty($fbml)) {
    $body = JString::str_ireplace(‘</body>’, $fbml.'</body>’.”rn”, $body, 1);
    //Declares a namespace for FBML tags in an HTML document.
    //add xmlns:fb=”http://www.facebook.com/2008/fbml” to header tag
    $regex = “/<html.*?xmlns:fb=”.*?”[^>]*?>/i”;
    if(!preg_match($regex, $body)) {
    $body = JString::str_ireplace(‘<html’, ‘<html xmlns:fb=”http://www.facebook.com/2008/fbml”‘, $body, 1);
    }
    }

    JResponse::setBody($body);
    }
    [/PHP]

    And change it to
    [PHP]
    function onAfterRender(){
    global $mainframe;
    if ($mainframe->isAdmin()) {
    return ”;
    }
    $body = JResponse::getBody();

    //include FBML
    $fbml = $this->getFBML();
    if(!empty($fbml)) {
    $body = JString::str_ireplace(‘</body>’, $fbml.'</body>’.”rn”, $body, 1);
    //Declares a namespace for FBML tags in an HTML document.
    //add xmlns:fb=”http://www.facebook.com/2008/fbml” to header tag
    $regex = “/<html.*?xmlns:fb=”.*?”[^>]*?>/i”;
    if(!preg_match($regex, $body)) {
    $body = JString::str_ireplace(‘<html’, ‘<html xmlns:fb=”http://www.facebook.com/2008/fbml”‘, $body, 1);
    }
    }
    if(JPluginHelper::isEnabled(‘system’,’jat3′)){
    $key = T3Cache::getPageKey ();
    if (($data = T3Cache::get ( $key )) && !preg_match(‘#<jdoc:include type=”([^”]+)” (.*)/>#iU’, $data)) {
    $buffer = JResponse::getBody ();
    T3Cache::store ( $buffer, $key );
    }

    }
    JResponse::setBody($body);
    }
    [/PHP]

    I hope this will help !

    sealr0x Friend
    #358657

    I have had the same problem. But it only appears when I turn the cache on. If caching is on then the facebook share plugin dissapears after the second load of the page, but the retweet still remains.

    Same thing with the JA Google Maps module. It stops working as soon as the cache is turned on?

    What can be the problem?

    Sherlock Friend
    #358868

    <em>@sealr0x 198107 wrote:</em><blockquote>I have had the same problem. But it only appears when I turn the cache on. If caching is on then the facebook share plugin dissapears after the second load of the page, but the retweet still remains.

    Same thing with the JA Google Maps module. It stops working as soon as the cache is turned on?

    What can be the problem?</blockquote>

    Dear sealr0x,

    you can try to do as my above post,I think it will help !

    sealr0x Friend
    #359732

    Hi, dathq!

    I have replaced the method “onAfterRender” as you suggested, but still the FB Share button dissapears.

    My Settings now is :

    System – Cache : Disabled.
    System – JA Compress : Enabled
    Global Configuration : Cache Settings is ON

    JA Google Maps works, but FB share does not work, even after the changes you suggested.

    Please advice …

    Sherlock Friend
    #360376

    <em>@sealr0x 199452 wrote:</em><blockquote>Hi, dathq!

    I have replaced the method “onAfterRender” as you suggested, but still the FB Share button dissapears.

    My Settings now is :

    System – Cache : Disabled.
    System – JA Compress : Enabled
    Global Configuration : Cache Settings is ON

    JA Google Maps works, but FB share does not work, even after the changes you suggested.

    Please advice …</blockquote>

    Dear sealr0x,

    I am afraid that you have to disable the joomla cache for this plugin working properly,there are no other ways.

    cplanetdoo Friend
    #419424

    I’m having the the same issue regarding to the “JA facebook like it” plugin and cache settings

    Is there any proper solution for this issue. I would like to keep the cache on.

    A link or anything would be apreciated

    cplanetdoo Friend
    #419483

    <em>@Dat Hoang 194075 wrote:</em><blockquote>Dear mmckeen,

    For this issue you can try as follow
    Go to the plugins/content/plg_jafacebookshare.php file,Look for this function
    [PHP]
    function onAfterRender(){
    global $mainframe;
    if ($mainframe->isAdmin()) {
    return ”;
    }
    $body = JResponse::getBody();

    //include FBML
    $fbml = $this->getFBML();
    if(!empty($fbml)) {
    $body = JString::str_ireplace(‘</body>’, $fbml.'</body>’.”rn”, $body, 1);
    //Declares a namespace for FBML tags in an HTML document.
    //add xmlns:fb=”http://www.facebook.com/2008/fbml” to header tag
    $regex = “/<html.*?xmlns:fb=”.*?”[^>]*?>/i”;
    if(!preg_match($regex, $body)) {
    $body = JString::str_ireplace(‘<html’, ‘<html xmlns:fb=”http://www.facebook.com/2008/fbml”‘, $body, 1);
    }
    }

    JResponse::setBody($body);
    }
    [/PHP]

    And change it to
    [PHP]
    function onAfterRender(){
    global $mainframe;
    if ($mainframe->isAdmin()) {
    return ”;
    }
    $body = JResponse::getBody();

    //include FBML
    $fbml = $this->getFBML();
    if(!empty($fbml)) {
    $body = JString::str_ireplace(‘</body>’, $fbml.'</body>’.”rn”, $body, 1);
    //Declares a namespace for FBML tags in an HTML document.
    //add xmlns:fb=”http://www.facebook.com/2008/fbml” to header tag
    $regex = “/<html.*?xmlns:fb=”.*?”[^>]*?>/i”;
    if(!preg_match($regex, $body)) {
    $body = JString::str_ireplace(‘<html’, ‘<html xmlns:fb=”http://www.facebook.com/2008/fbml”‘, $body, 1);
    }
    }
    if(JPluginHelper::isEnabled(‘system’,’jat3′)){
    $key = T3Cache::getPageKey ();
    if (($data = T3Cache::get ( $key )) && !preg_match(‘#<jdoc:include type=”([^”]+)” (.*)/>#iU’, $data)) {
    $buffer = JResponse::getBody ();
    T3Cache::store ( $buffer, $key );
    }

    }
    JResponse::setBody($body);
    }
    [/PHP]

    I hope this will help !</blockquote>

    Well I tried the above for the plg_jafacebooklike.php and i think it works fine now. Thanks!!

Viewing 10 posts - 1 through 10 (of 10 total)

This topic contains 10 replies, has 5 voices, and was last updated by  cplanetdoo 13 years ago.

We moved to new unified forum. Please post all new support queries in our New Forum