X

The X button opens the Compose a new post pop-up to post to the survey taker's X, formerly known as Twitter, timeline. If not already signed in, the respondent is prompted to do so.

The post can be pre-populated with text, usually from the survey taker response in the survey. The post also usually includes a company reference (the company's name and URL to their website). The respondent may delete the pre-populated elements. Clicking the Post button publishes the post on the respondent's X timeline.

Shortly after the pop-up loads, the button changes to its disabled state.

For information on how to implement a social link in a survey, see Social links in surveys.

Configure the link with these parameters. The values may be literal or retrieved from Data fields.

Parameter

Description

Example

handle

The company’s Twitter handle, generally a personal ID of the company, to help track posts.

Medallia

url

or

href

URL to the Unit or company's X page. This URL is included in the tweet itself.

https://www.x.com/medallia

tweet

A pre-populated message to send as a post, typically the user’s previously entered comment.

Medallia’s new space is amazing!

windowHeight

Optional. Width of the pop-up window in either pixels (integer) or as a screen percentage. Default is 600 pixels.

450(pixels)
75%(percent of window)

windowWidth

Optional. Height of the pop-up window in either pixels (integer) or as a screen percentage. Default is 600 pixels.

500(pixels)
50%(percent of window)

This example pre-populates the post with the survey taker's comment as identified in the q_ltr_comment_txt survey field. It also include a reference to the Unit or Company's X page:

<div id="social-link-config-twitter" style="visibility: hidden; display: none;">
    <span id="twitter-href">[=u_twitter_href:html]</span>
    <span id="twitter-handle">[=u_twitter_handle:html]</span>
    <textarea id="twitter-tweet">[=q_ltr_comment_txt:html]</textarea>
    <span id="twitter-window-height">600</span>
    <span id="twitter-window-width">600</span>
    <script type="text/javascript">
        if (!Array.isArray(window.MedalliaSocialLinks)) {
            window.MedalliaSocialLinks = [];
        }

        window.MedalliaSocialLinks.push({
            type: 'twitter',
            handle: document.getElementById('twitter-handle').innerHTML,
            href: document.getElementById('twitter-href').innerHTML,
            tweet: document.getElementById('twitter-tweet').value,
            windowHeight: document.getElementById('twitter-window-height').innerHTML,
            windowWidth: document.getElementById('twitter-window-width').innerHTML
        });
    </script>
</div>