net3000.instagram
1.0.0
dotnet add package net3000.instagram --version 1.0.0
NuGet\Install-Package net3000.instagram -Version 1.0.0
<PackageReference Include="net3000.instagram" Version="1.0.0" />
<PackageVersion Include="net3000.instagram" Version="1.0.0" />
<PackageReference Include="net3000.instagram" />
paket add net3000.instagram --version 1.0.0
#r "nuget: net3000.instagram, 1.0.0"
#:package net3000.instagram@1.0.0
#addin nuget:?package=net3000.instagram&version=1.0.0
#tool nuget:?package=net3000.instagram&version=1.0.0
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}");
}
Create Carousel Posts
// 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 | Versions 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. |
-
net10.0
- Microsoft.EntityFrameworkCore (>= 10.0.7)
- net3000.common (>= 10.0.21)
- Newtonsoft.Json (>= 13.0.4)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on net3000.instagram:
| Package | Downloads |
|---|---|
|
net3000.servicecoordinator
Service coordination library for Net3000 solutions. Provides API connection management and service orchestration capabilities. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 196 | 7/9/2026 |
Initial release of Net3000 Instagram library with Basic Display API integration.