Dokumen ini sudah diperbarui.
Terjemahan ke Bahasa Indonesia belum selesai.
Bahasa Inggris diperbarui: 1 Agu
Bahasa Indonesia diperbarui: 25 Nov 2021

Workplace from Meta is going away. You will be able to continue using Workplace until 31 August 2025. Visit our Help Center to find out more.

Sharing to Workplace

If you have content that exists outside of Workplace, you may want to make it simple for people to share that content back into Workplace, so that others can find it, or to start a discussion in a Workplace group.

Workplace supports several ways to share content from apps or websites, including the Workplace Share Dialog for web and Workplace Share Extension on mobile.

Sharing via Workplace Share Dialog

To share web-based content to Workplace, for example content hosted on an intranet site, you can provide a button that launches the Workplace Share Dialog. This dialog allows you to share content to a Workplace group, to your Workplace profile, or to a person or group of people via a Work Chat message.

The Workplace Share Dialog can be launched in a new tab or in a browser popup window, and requires a parameter for the URL of the object you're sharing. The Workplace Share Dialog assumes an active Workplace session. It can be invoked via the generic subdomain work.workplace.com, but will immediately redirect to the active user's company subdomain.

Under the hood, the Workplace Share Dialog inherits from the Facebook Share Dialog, so much of the functionality is identical. Unlike the Facebook Share Dialog, an app ID cannot be passed to the Workplace Share Dialog.

Launching the Share Dialog via Javascript

You can launch the dialog by placing a button on your UI and adding a JavaScript handler that uses window.open to launch a new window. For example:

<button onclick="share()">Share to Workplace</button>
<script>
share = function(){
    url = 'https://work.workplace.com/sharer.php?display=popup&u=' + window.location.href;
    options = 'toolbar=0,status=0,resizable=1,width=626,height=436';
    window.open(url,'sharer',options);
}
</script>

You can launch the dialog directly via a HTML hyperlink if you can provide the URL at render time. For example:

<a href="https://work.workplace.com/sharer.php?display=page&u=https://developers.facebook.com" target="_blank">
    Share to Workplace
</a>

Workplace Share Dialog Parameters

The Workplace Share Dialog takes the following parameters:

ParameterRequiredDescription

u

Yes

The URL to be shared

display

No

The preferred display method for the dialog:

  • If launching via a Javascript window.open call, use display=popup
  • If launching via a link, use display=page

redirect_uri

No

If you're launching the dialog via display=page, you can ensure people return to your site by providing a redirect URI back to where they were before launching the dialog.

Sharing from Mobile Apps

When the Workplace app is installed on mobile device, a new share dialog will be made available to apps that support sharing via Share Extensions (iOS) or Share Intents (Android). Many enterprise apps already support this method of sharing, so it should be possible to share directly to Workplace from these apps.

Authenticated Previews

When you pass a private URL to Workplace, you can ensure that Workplace shows a rich preview to people who can see it, by enabling support for Authenticated Previews.