Profile SDK

Integration

The profile SDK allows you to easily embed a PopJam user profile and channel feed in your application.

Info Contents
Contact popjam-support@superawesome.com
License GNU Lesser General Public License v3
_images/profile.png

The process to do this is very simple:

Step 1. Create a container for the embedded tool and provide a width and height

<body>
    <!-- (...) -->

    <!-- Create a container for the PopJam profile widget and assign an id -->
    <div id="popjam-profile-container" style="width: 30%;"></div>

    <!-- (...) -->
</body>

Step 2. Include the profile sdk script and set the desired parameters as explained in the comments below

<body>
    <!-- (...) -->

    <!-- Create a container for the PopJam profile widget and assign an id -->
    <div id="popjam-profile-container" style="width: 30%;"></div>

    <!-- (...) -->

    <!--
        Include the PopJam SDK and pass attributes via the data prefix
        List of attributes:
        - data-container - the id of the created container element above (REQUIRED)
        - data-feed-id - the id of the channel (REQUIRED)
        - data-in-feed-ads-placement-id - AwesomeAds placement id for in feed ads (OPTIONAL)
        - data-max-posts - set the maximum number of posts (OPTIONAL)
        - data-show-video - boolean to show or hide video posts (OPTIONAL)
        - data-show-rejam - boolean to show or hide rejam posts (OPTIONAL)
        - data-deeplink - boolean to enable or disable deeplink functionality (OPTIONAL)
    -->

    <script
        src="https://sdk.popjam.com/v1/web/profile/widget.min.js"
        data-container="popjam-profile-container"
        data-feed-id="476bd9d0-dd47-4231-9d80-3f37f527efab"
    ></script>
</body>

Let’s put it all together in an example website:

<!doctype html>

<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>PopJam Integration Demo</title>
        <meta name="description" content="PopJam Integration Demo">
        <meta name="author" content="SuperAwesome">
    </head>

    <body>
        <div id="popjam-profile-container" style="width: 30%"></div>

        <script
            src="https://sdk.popjam.com/v1/web/profile/widget.min.js"
            data-container="popjam-profile-container"
            data-feed-id="476bd9d0-dd47-4231-9d80-3f37f527efab"
        ></script>
    </body>
</html>

Mobile

The profile SDK can easily be embedded in a webview by invoking the follow URL:

The query parameters (camelcased) match the parameters configured through the data-* attribute in the web integration.

Intercepting deeplink calls. For deeplinks to work, the call needs to be intercepted and redirected to a browser.

See here on how to do that.