The Facebook social link supports two scenarios:
- The survey taker is redirected to the company’s Facebook page at either brand or location level.
- The survey taker posts about the brand on their personal time line.
For information on how to implement a social link in a survey, see Social links in surveys.
Redirecting to company Facebook Business page
In this scenario, clicking the Facebook button opens the pop-up to either the company's Facebook Business main page, or to the Posts or Reviews sections. When the survey taker is signed-in, they can use the standard Facebook features such as Like, Follow, Share, Message, etc., and they may use any custom options like Post comment, Add review, Signup for updates, etc.
Shortly after the pop-up loads, the button changes to its disabled state.
Configuring the link for a Facebook Business page
Configure the link with these parameters. The values may be literal or retrieved from Data fields.
Parameter | Description | Example |
|---|---|---|
| The Facebook handle to view the company's page. For example, the
|
|
| Whether or not to open the company's Reviews subpage of the business page. When this parameter is
Otherwise, when
|
|
|
|
Optional. Width of the pop-up window in either pixels (integer) or as a screen percentage. Default is 600 pixels. |
|
|
|
Optional. Height of the pop-up window in either pixels (integer) or as a screen percentage. Default is 600 pixels. |
|
This example retrieves the company's handle from a Unit field name u_facebook_page_handle, and whether or not to open the reviews page from a Unit field named u_facebook_page_load_review_page:
<div id="social-link-config-facebook-page" style="visibility: hidden; display: none;">
<span id="facebook-page-handle">[=u_facebook_page_handle:html]</span>
<span id="facebook-page-load-review-page">[=u_facebook_page_load_review_page:html]</span>
<span id="facebook-page-window-height">600</span>
<span id="facebook-page-window-width">600</span>
<script type="text/javascript">
if (!Array.isArray(window.MedalliaSocialLinks)) {
window.MedalliaSocialLinks = [];
}
window.MedalliaSocialLinks.push({
type: 'facebookPage',
handle: document.getElementById('facebook-page-handle').innerHTML,
loadReviewPage: document.getElementById('facebook-page-load-review-page').innerHTML,
windowHeight: document.getElementById('facebook-page-window-height').innerHTML,
windowWidth: document.getElementById('facebook-page-window-width').innerHTML
});
</script>
</div>Posting to respondent's timeline
In this scenario, clicking the Facebook button opens the pop-up to post to the respondent's Facebook timeline. If the survey taker is not already signed in to Facebook, they are first prompted to authenticate.
The posting includes a link to the company’s website or Facebook Business page, which will appear in the posting. When the URL is to a non-Facebook Business page, the post may include a pre-populated caption, which the customer may delete (the Facebook SDK does not support rendering pre-populated captions with Facebook page URLs).
In the window, the survey taker may:
- Add personal comments.
- Delete the pre-populated hashtag and/or caption.
- Change the post’s visibility settings.
- Click the Post to Facebook button publishes the post on the respondent's Facebook timeline.
The Facebook social link button remains in the enabled state while the pop-up window is open. If the pop-up window closes without the user having posted a comment, the button remains in the enabled state. Once the survey taker posts a comment and the pop-up window closes, the button changes to the disabled state.
Configuring the link for a customer's time line
|
Parameter |
Description |
Example |
|---|---|---|
|
|
The application ID as provided by Facebook through the Meta Developer portal. For more information, see Obtaining a Facebook Application ID. | 7493034874503453 |
|
or
|
The URL to the company’s Facebook page or other website. |
|
|
|
A pre-populated message to set as an attached quote to the post, typically either a message loaded from a Data field or a previously entered response by the survey taker. Restriction: This quote does not appear when the Facebook page is specified in the
url/href parameter. |
|
|
|
A pre-populated text to be set as hashtag to the post. The hashtag should include the octothorpe symbol ( |
|
This example retrieves the Facebook Application ID, and optional URL and hashtag values from Unit fields, and retrieves the respondent's comment from the survey, and pre-populates all of them in their post.
<div id="social-link-config-facebook-post" style="visibility: hidden; display: none;">
<span id="facebook-post-app-id">[=u_facebook_post_appid:html]</span>
<span id="facebook-post-url">[=u_facebook_post_href:html]</span>
<textarea id="facebook-post-quote">[=q_ltr_comment_txt:html]</textarea>
<textarea id="facebook-post-hashtag">[=u_ltr_hashtag_txt:html]</textarea>
<script type="text/javascript">
if (!Array.isArray(window.MedalliaSocialLinks)) {
window.MedalliaSocialLinks = [];
}
window.MedalliaSocialLinks.push({
type: 'facebookPost',
appId: document.getElementById('facebook-post-app-id').innerHTML,
url: document.getElementById('facebook-post-url').innerHTML,
quote: document.getElementById('facebook-post-quote').value,
hashtag: document.getElementById('facebook-post-hashtag').value
});
</script>
</div>
Obtaining a Facebook Application ID
Follow the steps below to obtain a Facebook application ID:
-
Go to the Meta Developer portal. Sign-in to Facebook with a Developer's account using the
Log In. -
Select the My Apps dropdown. Either select one of the previously configured applications or click Add a New App.
-
When adding a new application, enter the app’s base identifying information in the pop-up that appears and click the Create App ID button in the bottom-right corner.
-
-
Locate the App ID value from the app’s dashboard page in the top-left corner of the main content area.
-
Include the Medallia Experience Cloud survey URL to allow posting from the survey:
-
Click Settings and then the Add Platform.
-
Select Website as the platform of choice.
-
Enter the base URL, including the protocol prefix, used to serve the surveys. If the company uses URL masking for Experience Cloud's Survey engine, use the masked version of the URL.
Restriction: Facebook only allows you to enter a single URL per application definition.
-
-
Publish the app to the public to allow users to access the application from their own Facebook accounts:
-
Click App Review and set Make public? to Yes.
-
You might be prompted to select a category for the app. if so, choose the most appropriate for the app, such as Apps for Pages.
-
