IGGraphClient 1.2.3
dotnet add package IGGraphClient --version 1.2.3
NuGet\Install-Package IGGraphClient -Version 1.2.3
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="IGGraphClient" Version="1.2.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IGGraphClient" Version="1.2.3" />
<PackageReference Include="IGGraphClient" />
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 IGGraphClient --version 1.2.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: IGGraphClient, 1.2.3"
#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 IGGraphClient@1.2.3
#: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=IGGraphClient&version=1.2.3
#tool nuget:?package=IGGraphClient&version=1.2.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Instagram Graph API Client (.NET 8)
This C# library allows you to interact with the Instagram Graph API using .NET 8. It provides features like:
- Fetching Instagram media
- Paginated navigation (next)
- Uploading posts with image and caption (including hashtags)
- Publishing media
- Checking access token expiration
🚀 How to Use
1. Initialize the Client
var client = new GraphClient(appId: "YOUR_IG_USER_ID", accessToken: "YOUR_LONG_LIVED_TOKEN");
2. Get Posts (First Page)
var posts = await client.GetMediaAsync();
foreach (var post in posts)
{
Console.WriteLine($"{post.Caption}: {post.MediaUrl}");
}
3. Get Next/Previous Pages
// Next page
var nextPage = await client.GetMediaAsync(after: aftercursors);
4. Create a Post (Upload Image with Caption & Hashtags)
string imageUrl = "https://your-public-url.com/image.jpg";
string caption = "Hello from .NET! #hashtag #instapost";
string? postId = await client.CreatePostAsync(imageUrl, caption);
Console.WriteLine($"New post published: {postId}");
5. Exchange Short Token for Long-Lived Token
string longToken = await GraphClient.GetLongAccessToken(clientId, clientSecret, shortToken);
6. Check Token Expiry
var tokenInfo = await GraphClient.CheckTokenExpiryAsync(longToken, appId, appSecret);
Console.WriteLine($"Token valid: {tokenInfo.Data.IsValid}, expires at: {tokenInfo.Data.ExpiresAtDateTime}");
✅ Requirements
- Instagram Business or Creator account
- Connected Facebook Page
- Instagram Graph API enabled in your Facebook App
- Long-lived access token
🔐 License
- This tool uses a license-based system for activation and usage control.
- A valid license is required to use this tool in production or commercial environments.
- The license includes essential details like product information and expiration date.
- For more information or to obtain a license, please contact the project maintainer pixelbyaj.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.