net3000.instagram 1.0.0

dotnet add package net3000.instagram --version 1.0.0
                    
NuGet\Install-Package net3000.instagram -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="net3000.instagram" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="net3000.instagram" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="net3000.instagram" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add net3000.instagram --version 1.0.0
                    
#r "nuget: net3000.instagram, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package net3000.instagram@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=net3000.instagram&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=net3000.instagram&version=1.0.0
                    
Install as a Cake Tool

Net3000 Instagram Library

A comprehensive Instagram API integration library for Net3000 solutions. This library provides easy-to-use methods for interacting with the Instagram Basic Display API, enabling media publishing and content management functionality.

Features

  • 📸 Media Upload: Upload images and videos to Instagram
  • 📱 Carousel Posts: Create multi-media carousel posts
  • 📊 Media Retrieval: Fetch user media with pagination support
  • 💬 Comments Management: Retrieve comments for media posts
  • ⚙️ Configuration Support: Easy configuration through IConfiguration
  • 🔐 Secure: Built-in access token management

Installation

Install the package via NuGet:

dotnet add package net3000.instagram

Configuration

Add your Instagram API credentials to your configuration:

{
  "Instagram": {
    "ClientId": "your-client-id",
    "ClientSecret": "your-client-secret",
    "UserId": "your-user-id",
    "AccessToken": "your-access-token"
  }
}

Usage

Basic Setup

using Net3000.Instagram.Services;

// Initialize with configuration
var instagramService = new InstagramService(configuration);

// Or set properties manually
var instagramService = new InstagramService
{
    ClientId = "your-client-id",
    ClientSecret = "your-client-secret",
    UserId = "your-user-id",
    AccessToken = "your-access-token"
};

Upload Media

// Upload a single image (default)
var result = await instagramService.UploadAsync(
    "https://example.com/image.jpg",
    "Check out this amazing photo! #photography"
);

// Upload a reel (pass mediaType explicitly)
var reelResult = await instagramService.UploadAsync(
    "https://example.com/reel.mp4",
    "Check out this amazing reel! #video",
    mediaType: "REELS"
);

if (result.success)
{
    Console.WriteLine($"Media uploaded successfully! ID: {result.data}");
}
// Upload multiple media as a carousel (images only)
string[] mediaUrls = {
    "https://example.com/image1.jpg",
    "https://example.com/image2.jpg"
};

var result = await instagramService.CarouselAsync(
    mediaUrls, 
    "Amazing photo collection! #gallery #photography"
);

Retrieve Media

// Get user's media with pagination
var mediaResult = await instagramService.MediaAsync(limit: 20);

if (mediaResult.success)
{
    var mediaResponse = (MediaResponse)mediaResult.data;
    foreach (var item in mediaResponse.data)
    {
        Console.WriteLine($"Media: {item.id} - {item.caption}");
    }
}

Get Comments

// Retrieve comments for a specific media
var commentsResult = await instagramService.CommentsAsync("media-id");

if (commentsResult.success)
{
    var comments = (CommentsResponse)commentsResult.data;
    foreach (var comment in comments.data)
    {
        Console.WriteLine($"Comment: {comment.text}");
    }
}

Supported Media Types

Images

  • JPG/JPEG
  • PNG
  • GIF
  • BMP
  • SVG

Videos

  • MP4
  • AVI
  • MOV
  • WMV
  • FLV
  • WebM
  • MKV

API Response Format

All methods return an apiResponse object with the following structure:

public class apiResponse
{
    public bool success { get; set; }
    public string message { get; set; }
    public object data { get; set; }
    public string title { get; set; }
}

Requirements

  • .NET 9.0 or later
  • Valid Instagram Basic Display API credentials
  • Instagram Business or Creator account

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Support

For support and questions, please contact Net3000.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on net3000.instagram:

Package Downloads
Net3000.Almotawif

Travel and pilgrimage booking library for Net3000 solutions. Provides services for managing packages, categories, departures, reservations, supplier imports, marketing metadata, notifications, and integrations such as Facebook posting and Twilio SMS.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 94 7/9/2026

Initial release of Net3000 Instagram library with Basic Display API integration.