Skip to content

URL API Calls

Justin Stolpe edited this page May 21, 2022 · 1 revision

URL calls are when you have a fully generated URL complete with endpoint, params, and access token. In this case all you need to do is pass the URL to the sendCustomRequest function

Example Business Discovery

// we have the complete url!
$completeUrl = "https://graph.facebook.com/v12.0/<IG_USER_ID>?business_discovery.username(<USERNAME>){username}&access_token=<ACCESS_TOKEN>";

// first we have to instantiate the core Instagram class with our access token
$instagram = new Instagram\Instagram( array(
    'access_token' => '<ACCESS_TOKEN>'
) );

// get the response
$response = $instagram->sendCustomRequest( $completeUrl );
Clone this wiki locally