• Resolved nightsun73

    (@nightsun73)


    Hi,

    When clicking on the update button within the plugin I receive the following error:

    Fatal error: Call to undefined method Facebook\Authentication\OAuth2Client::getCodeFromAccessToken() in /var/sites/t/thebullcolchester.co.uk/public_html/wp-content/plugins/eme-sync-facebook-events/eme-sync-facebook-events.php on line 138

    I have log out/in from the plubin page and checked my App ID, App Secret and page ID.

    Any idea as to what the issue may be before I go on the hunt for anew plugin.

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Franky

    (@liedekef)

    Seems to me you have multiple facebook-things running, all with their own facebook classes (and that will break things I guess). The function getCodeFromAccessToken is in the facebook class-code I provide with EME.

    Thread Starter nightsun73

    (@nightsun73)

    If only if it were so simple, no other facebook functionality on the site. I have disabled all other plugins but EME and EME facebook sync. All was working fine and I have mad no changed to the site.

    L

    Plugin Author Franky

    (@liedekef)

    This is weird then … if that function is missing, I wonder how it ever could’ve worked ??
    Let me see that by accident I didn’t forgot to include newer facebook files in the released version …

    Plugin Author Franky

    (@liedekef)

    It seems indeed there’s an error in that section of the code, no idea why nobody reported that sooner … I’ll check it out this evening.

    Plugin Author Franky

    (@liedekef)

    Quick try, could you change the 3 lines 138-140 in eme-sync-facebook-events.php to:

    
                            $code = $oAuth2Client->getCodeFromLongLivedAccessToken($facebook_session);
                            $facebook_session = $oAuth2Client->getAccessTokenFromCode($code);
                            update_option('eme_sfe_fb_access_token',$facebook_session);
    

    ?

    Thread Starter nightsun73

    (@nightsun73)

    Thanks Franky that seems to have done the trick.

    L

    Thread Starter nightsun73

    (@nightsun73)

    OK carried out a full refresh, it does not seem to be removing deleted events from the DB when a full sync is carried out. Is there anyway to nuke all events and re-sync?

    L

    Plugin Author Franky

    (@liedekef)

    Go into the EME admin interface and delete the events.
    Or go into the EMEFS settings and unselect “Skip synced events and locations”

    Thread Starter nightsun73

    (@nightsun73)

    Great, thanks for all your help

    L

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘OAuth2Client Error’ is closed to new replies.