SocialMediaSharingBlazor 7.1.0

dotnet add package SocialMediaSharingBlazor --version 7.1.0
                    
NuGet\Install-Package SocialMediaSharingBlazor -Version 7.1.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="SocialMediaSharingBlazor" Version="7.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SocialMediaSharingBlazor" Version="7.1.0" />
                    
Directory.Packages.props
<PackageReference Include="SocialMediaSharingBlazor" />
                    
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 SocialMediaSharingBlazor --version 7.1.0
                    
#r "nuget: SocialMediaSharingBlazor, 7.1.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 SocialMediaSharingBlazor@7.1.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=SocialMediaSharingBlazor&version=7.1.0
                    
Install as a Cake Addin
#tool nuget:?package=SocialMediaSharingBlazor&version=7.1.0
                    
Install as a Cake Tool

Social Media Sharing Blazor

Blazor class library that enables you to access the native web social media sharing functionality using C#. The library wraps the PWA web share functionality on which you can read more here: https://web.dev/web-share/

Browser Support

Details on browser support can be found here:

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share#browser_compatibility

Quick Installation Guide

  • Install Package

    dot net cli

    dotnet add package SocialMediaSharingBlazor
    

    or

    Package Manager

    Install-Package SocialMediaSharingBlazor
    
  • Add the following to the relevant sections of Program.cs

    using SocialMediaSharingBlazor;
    
    builder.Services.AddSocialMediaSharing();
    
  • Add the following to the top of component you want to use it on:

    @using SocialMediaSharingBlazor;
    
    @inject ISocialMediaSharing socialMediaSharing;
    

Usage


<button class="btn btn-primary" @onclick="Share">Click me</button>

@code {
    private void Share()
    {
        socialMediaSharing.ShareOnSocialMedia(
        title: "Social Media Sharing Blazor", 
        text: "Check out this blazor library that helps you share on social media using c#", 
        url: "https://www.nuget.org/packages/SocialMediaSharingBlazor/");
    }
}

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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.  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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
7.1.0 4,610 2/23/2023
7.0.0 891 11/9/2022
6.0.4 1,686 4/23/2022
6.0.0 737 11/9/2021
5.2.0 773 8/23/2021
5.1.3 695 8/22/2021
5.1.2 703 8/22/2021
5.1.1 691 8/22/2021