Public Ticket #486370
Sorry, invalid page for facebook stats widget


  • Lynne started the conversation

    Hello :) On my website lately it has displayed "Sorry, invalid page" with reference to my facebook page. If you visit my website you will see what I mean. It has only happened recently. I've changed the url to test it and it still gives the error. Today I have also updated the theme to your latest version.

    Appreciate your advice :) Thanks again for such a super theme! I've kept it for the past two years....love it :)



  •  5
    Michael replied


    thanks for reporting this. Having looked into the issue it seems that Facebook has recently changed their API (the system that we use to fetch followers count). Unfortunately there is not a quick fix that can be applied as the new API is completely different.

    I can offer a workaround that will let you type in your followers count manually:

    Open the file megamag/inc/widget_megamag_nomain_sidebar_social_counter.php and on line 29 you will see

    <span><?php if(mb_get_facebook_count($facebook_page) === false) {echo \"Sorry, invalid page.\";} else {echo mb_get_facebook_count($facebook_page);} ?></span>

    change this to

    <span><?php echo $facebook_page; ?></span>

    now the social counter simply outputs whatever you put as the facebook page name - so you can insert your followers count manually in this field instead.

    There are also several plugins that offer social counter functionality - so this is another option.

    We will keep looking into a solution for the social counter widget.
  • Lynne replied

    Thanks Michael :)

    I found when I replaced that code it showed the name of my facebook page in the widget. What I did instead as a temporary workaround was keep the original piece of coding but where it said to echo \"Sorry, invalid page\" I just entered the manually the number of facebook fans. I\'ll just update manually as required. I love your theme so much and the social counter widget that I\'d rather keep that and modify than change to someone elses.

    Thanks :)

  •  5
    Michael replied

    Nice solution - why didn\'t I think of that :D

    Glad you\'re still enjoying the theme :)