Line.Messaging.NETCore
1.2.1
dotnet add package Line.Messaging.NETCore --version 1.2.1
NuGet\Install-Package Line.Messaging.NETCore -Version 1.2.1
<PackageReference Include="Line.Messaging.NETCore" Version="1.2.1" />
paket add Line.Messaging.NETCore --version 1.2.1
#r "nuget: Line.Messaging.NETCore, 1.2.1"
// Install Line.Messaging.NETCore as a Cake Addin
#addin nuget:?package=Line.Messaging.NETCore&version=1.2.1
// Install Line.Messaging.NETCore as a Cake Tool
#tool nuget:?package=Line.Messaging.NETCore&version=1.2.1
Perform issue fixes and version upgrade for Line.Messaging
- Upgraded the framework from .NET Framework 4.6 to .NET Core 6 and addressed compatibility issues.
- Updated URLs for image, audio, and video messages to use a different domain name.
- Created message types for image, audio, and video.
The original project URL
Modified content references to the data source at
Development environment
- Visual Stdio 2022
TargetFramework
- .net 6
Sample Code
You can see my sample code in
https://github.com/roy55688/LineBot_Sample
using LineBotTemplate.Applications;
using Line.Messaging;
using Line.Messaging.Webhooks;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSingleton<LineMessagingClient>(provider =>
{
var AccessToken = "Your AccessToken";
return new LineMessagingClient(AccessToken);
});
builder.Services.AddHttpContextAccessor();
var app = builder.Build();
app.MapPost("/linebot", async (IServiceProvider serviceProvider, ILineBotApplication lineBotApplication) =>
{
HttpContext _httpContext = serviceProvider.GetRequiredService<IHttpContextAccessor>().HttpContext;
var ChannelSecret = "Your ChannelSecret";
var events = await _httpContext.Request.GetWebhookEventsAsync(ChannelSecret);
await lineBotApplication.RunAsync(events);
return Results.NoContent();
});
app.Run();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net6.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
1.The original project URL is https://github.com/pierre3/LineMessagingApi/.
2.Upgraded the framework from .NET Framework 4.6 to .NET Core 6 and addressed compatibility issues.
3.Updated URLs for image, audio, and video messages to use a different domain name.
4.Created message types for image, audio, and video.
5.Modified content references to the data source at https://ithelp.ithome.com.tw/users/20106865/ironman/2732.