Facebook_Helpers::api_request( $page_id,  $body,  $action_data = null )

Method api_request


Parameters Parameters

$params

(Required)


Top ↑

Return Return

(void)


Source Source

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

	public function api_request( $page_id, $body, $action_data = null ) {

		$access_token = $this->get_user_page_access_token( $page_id );

		$body['access_token'] = $access_token;

		$params = array(
			'endpoint' => self::API_ENDPOINT,
			'body'     => $body,
			'action'   => $action_data,
			'timeout'  => 10,
		);

		$response = Api_Server::api_call( $params );

		$this->check_for_errors( $response );

		return $response;

	}