Facebook_Helpers::automator_integration_facebook_capture_token_disconnect()

Disconnects the user account from Facebook by deleting the access tokens.


Description Description

It actually doesn’t disconnect the Facebook account but rather prevent it from accessing the API.


Top ↑

Return Return

(Uncanny_Automatorvoid.)


Source Source

File: src/integrations/facebook/helpers/facebook-helpers.php

	public function automator_integration_facebook_capture_token_disconnect() {

		if ( wp_verify_nonce( filter_input( INPUT_GET, 'nonce', FILTER_DEFAULT ), self::OPTION_KEY ) ) {
			delete_option( self::OPTION_KEY );
			delete_option( '_uncannyowl_facebook_pages_settings' );
			delete_transient( 'uo-fb-transient-user-connected' );
			wp_safe_redirect( $this->get_settings_page_uri() );
			exit;
		}

		wp_die( esc_html__( 'Nonce Verification Failed', 'uncanny-automator' ) );

	}