• Resolved bwilcox

    (@bwilcox)


    I’ve run into some trouble with the Facebook feed breaking when I try to update it. The issue seems to be coming from the Facebook Access Token. Occasionally, the Access Token transient gets saved as an empty string in the database. When the Facebook Cache Manager tries to fetch that transient with this line of code:

    if (false !== ($access_token_transient = get_transient(FlowFlow::$PLUGIN_SLUG_DOWN . self::$postfix_at))){
        $access_token = $access_token_transient;
    }

    It returns an empty string instead of false, and then tries to use it to fetch Facebook posts, which returns an error.

    I’ve found a fix to the problem by changing that line of code to this:

    if (false != ($access_token_transient = get_transient(FlowFlow::$PLUGIN_SLUG_DOWN . self::$postfix_at))){
        $access_token = $access_token_transient;
    }

    which causes the empty string will also be evaluated as false, but I’m wondering if there’s a fix in the works or something I can do to prevent the empty string from getting saved in the first place.

    Thank you

    • This topic was modified 8 years, 4 months ago by bwilcox.
    • This topic was modified 8 years, 4 months ago by bwilcox.
  • The topic ‘Facebook Feed breaking’ is closed to new replies.