C# Class Decision.Common.OpenGraph.Media.OpenGraphImage

An image which should represent your object within the graph. Use images that are at least 1200 x 630 pixels for the best display on high resolution devices. At the minimum, you should use images that are 600 x 315 pixels to display link page posts with larger images. If your image is smaller than 600 x 315 pixels, it will still display in the link page post, but the size will be much smaller. Try to keep your images as close to 1.91:1 aspect ratio as possible to display the full image in News Feed without any cropping. The minimum size of an image is 200 x 200. If you try to use an image smaller than this you will see an error in the URL Debugger.
Inheritance: OpenGraphSizedMedia
Show file Open project: rabbal/Decision Class Usage Examples

Public Methods

Method Description
OpenGraphImage ( string imageUrl ) : System.Text

Initializes a new instance of the OpenGraphImage class.

OpenGraphImage ( string imageUrl, int width, int height ) : System.Text

Initializes a new instance of the OpenGraphImage class.

OpenGraphImage ( string imageUrl, string type ) : System.Text

Initializes a new instance of the OpenGraphImage class.

OpenGraphImage ( string imageUrl, string type, int width, int height ) : System.Text

Initializes a new instance of the OpenGraphImage class.

ToString ( StringBuilder stringBuilder ) : void

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

Method Details

OpenGraphImage() public method

Initializes a new instance of the OpenGraphImage class.
Thrown if imageUrl is null.
public OpenGraphImage ( string imageUrl ) : System.Text
imageUrl string The image URL.
return System.Text

OpenGraphImage() public method

Initializes a new instance of the OpenGraphImage class.
Thrown if is null.
public OpenGraphImage ( string imageUrl, int width, int height ) : System.Text
imageUrl string The media URL.
width int The width of the media in pixels. This is optional.
height int The height of the media in pixels. This is optional.
return System.Text

OpenGraphImage() public method

Initializes a new instance of the OpenGraphImage class.
Thrown if is null.
public OpenGraphImage ( string imageUrl, string type ) : System.Text
imageUrl string The media URL.
type string The MIME type of the media e.g. media/jpeg. This is optional if your media URL ends with /// a file extension, otherwise it is recommended.
return System.Text

OpenGraphImage() public method

Initializes a new instance of the OpenGraphImage class.
Thrown if is null.
public OpenGraphImage ( string imageUrl, string type, int width, int height ) : System.Text
imageUrl string The media URL.
type string The MIME type of the media e.g. media/jpeg. This is optional if your media URL ends with /// a file extension, otherwise it is recommended.
width int The width of the media in pixels. This is optional.
height int The height of the media in pixels. This is optional.
return System.Text

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 System.Text.StringBuilder The string builder.
return void