Embed Code

Following is an example of a typical App embed code:

<div
    data-url="abcd1234efgh-000.projects.fm"
    data-groupid=""
    data-channelid=""
    class="fmUploader"
></div>

<script src="//abcd1234efgh-000.projects.fm/a/js/widget/embed.js" type="text/javascript">
</script>

In most cases, simply pasting this embed code on your webpage should be sufficient. In cases where you wish to override the settings in the Publisher, you can do that by setting, for example, a Group or Channel ID directly in the embed code. The available overrides that can be set directly in the embed code are below.

Attribute Required Description
data-url Required The URL of the App to embed.
data-groupid Optional The Group ID of the media destination group.
data-channelid Optional The Channel ID of the media destination channel.
data-grouplist Optional true/false - Shows the group dropdown list if the data-groupid has child groups
data-channellist Optional true/false - Shows the channel dropdown list if the data-channelid has child channels

Webpage Example

The following example shows how a Group and a Channel ID can be set in the embed code. The result is that all uploads that pass through this app will be saved in the group with ID 1111 and in the channel with ID 2222.

<div
    data-url="abcd1234efgh-000.projects.fm"
    data-groupid="1111"
    data-grouplist="true"
    data-channelid="2222"
    data-channellist="true"
    class="fmUploader">
</div>

<script src="//abcd1234efgh-000.projects.fm/a/js/widget/embed.js" type="text/javascript">
</script>

Native app with Janrain Login - WebView Example

The following example shows how to embed the Upload Widget into a WebView of a native iOS or Android App and have the ability to Login with Janrain Social Login. To do this, simply add the new parameters in the embed code that are highlighted in bold.

<div
    data-url="abcd1234efgh-000.projects.fm"
    data-groupid=""
    data-grouplist=""
    data-channelid=""
    data-channellist=""
    data-janrainpopup="false"
    data-janraintype="embed"
    data-janraintokenaction="url"
    class="fmUploader">
</div>

<script src="//abcd1234efgh-000.projects.fm/a/js/widget/embed.js" type="text/javascript">
</script>

0 comments

Be the first to comment on Embed Code.

Add a Comment

  • captcha