C# Class Decision.Common.OpenGraph.ObjectTypes.OpenGraphMetadata

The Open Graph protocol enables any web page to become a rich object in a social graph. For instance, this is used on Facebook to allow any web page to have the same functionality as any other object on Facebook. See http://ogp.me for the official Open Graph specification documentation. See https://developers.facebook.com/docs/sharing/opengraph for Facebook Open Graph documentation. See https://www.facebook.com/login.php?next=https%3A%2F%2Fdevelopers.facebook.com%2Ftools%2Fdebug%2F for the Open Graph debugging tool to test and verify your Open Graph implementation.
Inheritance: IHtmlString
Afficher le fichier Open project: rabbal/Decision Class Usage Examples

Méthodes publiques

Méthode Description
OpenGraphMetadata ( string title, OpenGraphImage image, string url = null ) : System

Initializes a new instance of the OpenGraphMetadata class.

ToHtmlString ( ) : string

Returns an HTML-encoded string containing the Open Graph meta tags.

ToString ( ) : string

Returns a HTML-encoded System.String that represents this instance containing the Open Graph meta tags.

ToString ( StringBuilder stringBuilder ) : void

Appends a HTML-encoded string representing this instance to the stringBuilder containing the Open Graph meta tags.

Method Details

OpenGraphMetadata() public méthode

Initializes a new instance of the OpenGraphMetadata class.
title or image is null.
public OpenGraphMetadata ( string title, OpenGraphImage image, string url = null ) : System
title string The title of the object as it should appear in the graph.
image Decision.Common.OpenGraph.Media.OpenGraphImage The default image.
url string The canonical URL of the object, used as its ID in the graph.
Résultat System

ToHtmlString() public méthode

Returns an HTML-encoded string containing the Open Graph meta tags.
public ToHtmlString ( ) : string
Résultat string

ToString() public méthode

Returns a HTML-encoded System.String that represents this instance containing the Open Graph meta tags.
public ToString ( ) : string
Résultat string

ToString() public méthode

Appends a HTML-encoded string representing this instance to the stringBuilder containing the Open Graph meta tags.
public ToString ( StringBuilder stringBuilder ) : void
stringBuilder StringBuilder The string builder.
Résultat void