Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Add constructor for OpenGraphShareContent. #42

Merged
merged 1 commit into from
Aug 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Sources/Share/Content/OpenGraph/OpenGraphShareContent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ public struct OpenGraphShareContent {
/// Property name that points to the primary Open Graph Object in the action. This is used for rendering the preview of the share.
public var previewPropertyName: OpenGraphPropertyName?

/**
Create a new OpenGraphShareContent.

- parameter action: The action to be shared.
- parameter previewPropertyName: Property name that points to the primary Open Graph Object in the action.
*/
public init(action: OpenGraphAction? = nil, previewPropertyName: OpenGraphPropertyName? = nil) {
self.action = action
self.previewPropertyName = previewPropertyName
}

//--------------------------------------
// MARK: - ContentProtocol
//--------------------------------------
Expand Down