# Class LinkEmbedService | EchoHub Documentation

# Class LinkEmbedService

Namespace
  EchoHub.Server.Services

Assembly
  EchoHub.Server.dll

    public class LinkEmbedService

Inheritance
  object
  LinkEmbedService

Inherited Members
  object.GetType()
  object.MemberwiseClone()
  object.ToString()
  object.Equals(object)
  object.Equals(object, object)
  object.ReferenceEquals(object, object)
  object.GetHashCode()

## Constructors

### LinkEmbedService(IHttpClientFactory, ILogger<LinkEmbedService>)

    public LinkEmbedService(IHttpClientFactory httpClientFactory, ILogger<LinkEmbedService> logger)

#### Parameters

`httpClientFactory` IHttpClientFactory
`logger` ILogger<LinkEmbedService>

## Methods

### TryGetEmbedsAsync(string)

Detect all URLs in message content and attempt to fetch OG embed data for each. Returns null if no URLs found or all fetches fail. Never throws — all errors are caught internally.

    public Task<List<EmbedDto>?> TryGetEmbedsAsync(string content)

#### Parameters

`content` string

#### Returns

Task<List<EmbedDto>>