Social Media Quote 4

Social Media Quote Administration Guide

Learn how to administer Sophora's Social Media Search & Quote module.

The module Social Media Quote is based on scripts.

The scripts will be triggered when URLs are dropped on the copytext in the editor view of the DeskClient. Additionally, the scripts may be triggered directly for an document via the toolbar of the DeskClient.

The scripts will then scan the copytext for paragraphs containing (exclusively) links of the supported social networks. The links will be resolved and a selection of content will be imported from the respective social network. The original content of the paragraph (i.e. the URL) will be replaced with this content.

Importing the scripts and configuring the repository

  1. Download the script files from our software repository.
  2. Import the files under repo-configuration, e.g. by using the DeskClient via "Document -> Import". This will add required node types including their configuration to the repository. The "Social-Media-Suche Konfiguration" system configuration document will be created. It contains a table of all the properties which are available to configure the behaviour of the scripts. If the document already exists, the keys for the properties will be added to the end of the table in the document.
  3. In the Administration view of the DeskClient, open the node type configuration of your node type for stories or articles (by default sophora-content-nt:story). On the "Form Tabs"-Tab, double-click on the property for the copytext (by default sophora-content:copytext). The newly imported paragraph types need to be configured as allowed here.
  4. In the Administration view of the DeskClient, open the node type configuration of sophora-extension-nt:paragraph. On the "Components"-Tab, double-click on "Paragraph Box" and add sophora-social-media-nt:imageBox as well as sophora-social-media-nt:authorImageBox to the list of "ValidChildNodeTypes". Also make sure that the child node sophora-extension:paragraphProperties is configured on this tab and has the mixin sophora-extension-mix:paragraphProperties in the list of "ValidChildNodeTypes". Save the configuration.
  5. Import the files under script-documents. This will add the following scripts to the Administration view of the DeskClient: "Import Social Media Posts" (currently only used for the import of GIPHY, Spotify, TikTok, Vimeo, Facebook, YouTube, Instagram and Twitter posts) and "Resolve ScribbleLive URLs".
  6. For each of these scripts, open the document in the Administration view. Activate the node types on which the script should operate and finally publish the document.
  7. Configure the scripts via the "Social-Media-Suche Konfiguration" system document (which was added in the first step). The valid values for each property are listed in the source code of the respective script document.

Configuration

Installing the add-on and restarting the DeskClient creates a new configuration document Social Media Search Configuration in Administration/System/Configuration, in which the access tokens and import information for the social media platforms have to be entered.

Import keys (Quote)

The import keys may be added to the Social Media Search Configuration document in order to configure the scripts that create copytext paragraphs to quote posts.

Facebook

KeyDescriptionExample
facebook.import.copytextChildnodeNamesName of the copytext child nodes that should be scanned by the script (required).sophora-content:copytext
facebook.import.images.activeIf set to "true", images will be imported and the following configuration parameters become relevant. Default is "false".true
facebook.import.images.nodetypeImage node type that will be used when creating images.sophora-extension-nt:image
facebook.import.images.refNodetypeImage reference node type that will be used when linking the paragraph to the images.sophora-content-nt:imageref
facebook.import.structureNodeExternalIdExternal ID of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document.c4bb5ef9-b3e1-4e1c-9d7b-2f8fe61e60e7
facebook.import.structurePathPath of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document./demosite/imports
facebook.import.images.idstemId stem for created image documents. Default is "facebook-import-image"facebook-import-image
facebook.import.images.externalIdPrefixPrefix for the external ID of created image documents. Default is "facebook-import-image-"facebook-import-image-
facebook.import.images.propertiesToSetExpressions to fill properties on the created image documents. Available placeholders: $AUTHOR$, $AUTHOR_URL$, $DATE$, $POST_URL$, $TITLE$sophora-extension:caption=$TITLE$
facebook.import.authorimages.idstemId stem for created author image documents. Default is "facebook-import-author-image"facebook-import-author-image
facebook.import.authorimages.externalIdPrefixPrefix for the external ID of created author image documents. Default is "facebook-import-author-image-"facebook-import-author-image-
facebook.import.authorimages.propertiesToSetSame as for "facebook.import.images.propertiesToSet" but used for the creation of author images.sophora-extension:alttext=Autor: $AUTHOR$
facebook.import.useOEmbedAPIIf set to "true", the post will be imported via the oEmbed API.
Please note: When this option is enabled, not all information can be imported. Specifically the publication date as well as all images of the post (author images included) can't be accessed via this manner. Therefore the facebook.import.images.active setting will have no effect, if the oEmbed API should be used.
Default is "false".
true
facebook.import.oEmbedAccessTokenThe access token used for accessing oEmbed data (required). This requires a registered Facebook app which has access to the oEmbed endpoint. For more information see https://developers.facebook.com/docs/plugins/oembed842165551622222|PK95cVe5gOCPRI922VlxKtDZifV

GIPHY

KeyDescriptionExample
socialmedia.import.copytextChildnodeNamesName of the copytext child nodes that should be scanned by the script (required).sophora-content:copytext
giphy.import.images.activeIf set to "true", images will be imported and the following configuration parameters become relevant. Default is "false".true
giphy.import.images.nodetypeImage node type that will be used when creating images.sophora-extension-nt:image
giphy.import.images.refNodetypeImage reference node type that will be used when linking the paragraph to the images.sophora-content-nt:imageref
giphy.import.structureNodeExternalIdExternal ID of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document.c4bb5ef9-b3e1-4e1c-9d7b-2f8fe61e60e7
giphy.import.structurePathPath of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document./demosite/imports
giphy.import.images.idstemId stem for created image documents. Default is "giphy-import-image"giphy-import-image
giphy.import.images.externalIdPrefixPrefix for the external ID of created image documents. Default is "giphy-import-image-"giphy-import-image-
giphy.import.images.propertiesToSetExpressions to fill properties on the created image documents. Available placeholders: $AUTHOR_NAME$, $AUTHOR_URL$, $DATE$, $TITLE$, $POST_URL$sophora-extension:caption=$TITLE$

Instagram

KeyDescriptionExample
instagram.import.copytextChildnodeNamesName of the copytext child nodes that should be scanned by the script (required).sophora-content:copytext
instagram.import.images.activeIf set to "true", images will be imported and the following configuration parameters become relevant. Default is "false".true
instagram.import.images.nodetypeImage node type that will be used when creating images.sophora-extension-nt:image
instagram.import.images.refNodetypeImage reference node type that will be used when linking the paragraph to the images.sophora-content-nt:imageref
instagram.import.structureNodeExternalIdExternal ID of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document.c4bb5ef9-b3e1-4e1c-9d7b-2f8fe61e60e7
instagram.import.structurePathPath of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document./demosite/imports
instagram.import.images.idstemId stem for created image documents. Default is "instagram-import-image"instagram-import-image
instagram.import.images.externalIdPrefixPrefix for the external ID of created image documents. Default is "instagram-import-image-"instagram-import-image-
instagram.import.images.propertiesToSetExpressions to fill properties on the created image documents. Available placeholders: $AUTHOR$, $INSTAGRAM_URL$sophora-extension:alttext=Autor: $AUTHOR$
instagram.import.authorimages.idstemId stem for created author image documents. Default is "instagram-import-author-image"instagram-import-author-image
instagram.import.authorimages.externalIdPrefixPrefix for the external ID of created author image documents. Default is "instagram-import-author-image-"instagram-import-author-image-
instagram.import.authorimages.propertiesToSetSame as for "instagram.import.images.propertiesToSet" but used for the creation of author images.sophora-extension:alttext=Autor: $AUTHOR$
instagram.import.oEmbedAccessTokenThe access token used for accessing oEmbed data (required). This requires a registered Facebook app which has access to the oEmbed endpoint. For more information see https://developers.facebook.com/docs/instagram/oembed842165551622222|PK95cVe5gOCPRI922VlxKtDZifV

ScribbleLive

KeyDescription
scribbleLive.import.copytextChildnodeNamesName of the copytext child nodes that should be scanned by the script (required).
scribbleLive.default.titleDefault title for the ScribbleLive event that will be used as paragraph property.
scribbleLive.default.themeIdDefault theme-id for the ScribbleLive event that will be used as paragraph property.
scribbleLive.default.heightDefault height for the ScribbleLive event that will be used as paragraph property.

Spotify

KeyDescriptionExample
socialmedia.import.copytextChildnodeNamesName of the copytext child nodes that should be scanned by the script (required).sophora-content:copytext
spotify.import.images.activeIf set to "true", images will be imported and the following configuration parameters become relevant. Default is "false".true
spotify.import.images.nodetypeImage node type that will be used when creating images.sophora-extension-nt:image
spotify.import.images.refNodetypeImage reference node type that will be used when linking the paragraph to the images.sophora-content-nt:imageref
spotify.import.structureNodeExternalIdExternal ID of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document.c4bb5ef9-b3e1-4e1c-9d7b-2f8fe61e60e7
spotify.import.structurePathPath of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document./demosite/imports
spotify.import.images.idstemId stem for created image documents. Default is "spotify-import-image"spotify-import-image
spotify.import.images.externalIdPrefixPrefix for the external ID of created image documents. Default is "spotify-import-image-"spotify-import-image-
spotify.import.images.propertiesToSetExpressions to fill properties on the created image documents. Available placeholders: $AUTHOR_NAME$, $AUTHOR_URL$, $DATE$, $TITLE$, $POST_URL$sophora-extension:caption=$TITLE$

TikTok

KeyDescriptionExample
socialmedia.import.copytextChildnodeNamesName of the copytext child nodes that should be scanned by the script (required).sophora-content:copytext
tiktok.import.images.activeIf set to "true", images will be imported and the following configuration parameters become relevant. Default is "false".true
tiktok.import.images.nodetypeImage node type that will be used when creating images.sophora-extension-nt:image
tiktok.import.images.refNodetypeImage reference node type that will be used when linking the paragraph to the images.sophora-content-nt:imageref
tiktok.import.structureNodeExternalIdExternal ID of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document.c4bb5ef9-b3e1-4e1c-9d7b-2f8fe61e60e7
tiktok.import.structurePathPath of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document./demosite/imports
tiktok.import.images.idstemId stem for created image documents. Default is "tiktok-import-image"tiktok-import-image
tiktok.import.images.externalIdPrefixPrefix for the external ID of created image documents. Default is "tiktok-import-image-"tiktok-import-image-
tiktok.import.images.propertiesToSetExpressions to fill properties on the created image documents. Available placeholders: $AUTHOR_NAME$, $AUTHOR_URL$, $DATE$, $TITLE$, $POST_URL$sophora-extension:caption=$TITLE$

Twitter

KeyDescriptionExample
twitter.import.copytextChildnodeNamesName of the copytext child nodes that should be scanned by the script (required).sophora-content:copytext
twitter.import.images.activeIf set to "true", images will be imported and the following configuration parameters become relevant. Default is "false".true
twitter.import.images.nodetypeImage node type that will be used when creating images.sophora-extension-nt:image
twitter.import.images.refNodetypeImage reference node type that will be used when linking the paragraph to the images.sophora-content-nt:imageref
twitter.import.structureNodeExternalIdExternal ID of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document.c4bb5ef9-b3e1-4e1c-9d7b-2f8fe61e60e7
twitter.import.structurePathPath of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document./demosite/imports
twitter.import.images.idstemId stem for created image documents. Default is "twitter-import-image"twitter-import-image
twitter.import.images.externalIdPrefixPrefix for the external ID of created image documents. Default is "twitter-import-image-"twitter-import-image-
twitter.import.images.propertiesToSetExpressions to fill properties on the created image documents. Available placeholders: $AUTHOR$, $AUTHOR_URL$, $DATE$, $POST_URL$, $TITLE$sophora-extension:caption=$TITLE$
twitter.import.authorimages.idstemId stem for created author image documents. Default is "twitter-import-author-image"twitter-import-author-image
twitter.import.authorimages.externalIdPrefixPrefix for the external ID of created author image documents. Default is "twitter-import-author-image-"twitter-import-author-image-
twitter.import.authorimages.propertiesToSetSame as for "twitter.import.images.propertiesToSet" but used for the creation of author images.sophora-extension:alttext=Autor: $AUTHOR$

Vimeo

KeyDescriptionExample
socialmedia.import.copytextChildnodeNamesName of the copytext child nodes that should be scanned by the script (required).sophora-content:copytext
vimeo.import.images.activeIf set to "true", images will be imported and the following configuration parameters become relevant. Default is "false".true
vimeo.import.images.nodetypeImage node type that will be used when creating images.sophora-extension-nt:image
vimeo.import.images.refNodetypeImage reference node type that will be used when linking the paragraph to the images.sophora-content-nt:imageref
vimeo.import.structureNodeExternalIdExternal ID of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document.c4bb5ef9-b3e1-4e1c-9d7b-2f8fe61e60e7
vimeo.import.structurePathPath of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document./demosite/imports
vimeo.import.images.idstemId stem for created image documents. Default is "vimeo-import-image"vimeo-import-image
vimeo.import.images.externalIdPrefixPrefix for the external ID of created image documents. Default is "vimeo-import-image-"vimeo-import-image-
vimeo.import.images.propertiesToSetExpressions to fill properties on the created image documents. Available placeholders: $AUTHOR_NAME$, $AUTHOR_URL$, $DATE$, $TITLE$, $POST_URL$sophora-extension:caption=$TITLE$

YouTube

KeyDescriptionExample
youtube.import.copytextChildnodeNamesName of the copytext child nodes that should be scanned by the script (required).sophora-content:copytext
youtube.import.images.activeIf set to "true", images will be imported and the following configuration parameters become relevant. Default is "false".true
youtube.import.images.nodetypeImage node type that will be used when creating images.sophora-extension-nt:image
youtube.import.images.refNodetypeImage reference node type that will be used when linking the paragraph to the images.sophora-content-nt:imageref
youtube.import.structureNodeExternalIdExternal ID of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document.c4bb5ef9-b3e1-4e1c-9d7b-2f8fe61e60e7
youtube.import.structurePathPath of the structure node where created images should be located. If both external ID and structure path are given, the external ID will be used. If none are given, the image will be located at the same structure node as its embedding document./demosite/imports
youtube.import.images.idstemId stem for created image documents. Default is "youtube-import-image"youtube-import-image
youtube.import.images.externalIdPrefixPrefix for the external ID of created image documents. Default is "youtube-import-image-"youtube-import-image-
youtube.import.images.propertiesToSetExpressions to fill properties on the created image documents. Available placeholders: $AUTHOR$, $AUTHOR_URL$, $TITLE$, $YOUTUBE_URL$sophora-extension:caption=$TITLE$

Configuring Drag And Drop Actions

Dragging a social media post from the Social Media Search into the copytext of a story document will create a new paragraph that contains the URL of the dragged post and execute all scripts with the trigger URL dropped into copytext (See Scripting). Since the content is not saved in HTML form, it can be structured the way the scripter sees fit for any kind of delivery.

Last modified on 11/20/20

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon