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
Exibir arquivo Open project: rabbal/Decision Class Usage Examples

Public Methods

Method 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 method

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.
return System

ToHtmlString() public method

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

ToString() public method

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

ToString() public method

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.
return void