ballerinax/instagram.bussiness Ballerina library

1.5.1

Overview

This is a generated connector for Instagram Graph API v12.0 OpenAPI specification.

Instagram is a free photo-sharing application that enables its users to take photos, apply filters, and share them on social networks.

Prerequisites

Before using this connector in your Ballerina application, complete the following:

Quickstart

To use the Instagram connector in your Ballerina application, update the .bal file as follows:

Step 1: Import connector

First, import the ballerinax/instagram.bussiness module into the Ballerina project.

Copy
import ballerinax/instagram.bussiness;

Step 2: Create a new connector instance

Initialize the connector.

Copy
bussiness:BearerTokenConfig apiKeyConfig = {
    token = "<ACCESS_TOKEN>"
};

bussiness:Client baseClient = check new Client(apiKeyConfig);

Step 3: Invoke connector operation

  1. Now you can use the operations available within the connector. Note that they are in the form of remote operations.

    Following is an example to get fields of a image, video, or album using the connector.

    Copy
    public function main() {
        string[] fields = ["id","username"];
        string mediaId = "2684065555656187876_50003825255";
    
        bussiness:MediaFieldsObject|error result = baseClient->getMediaInfo(mediaId, fields);
        if (result is bussiness:MediaFieldsObject) {
            log:printInfo(result.toString());
        } else {
            log:printInfo(result.toString());
        }
    }
  2. Use bal run command to compile and run the Ballerina program.

Import

import ballerinax/instagram.bussiness;Copy

Metadata

Released date: 12 months ago

Version: 1.5.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 0

Current verison: 0


Weekly downloads


Source repository


Keywords

Marketing/Social Media Accounts

Cost/Free


Contributors

Other versions