CHAPTER 3

image

Yammer App Development Basics

Pathik Rawal

The first two chapters covered the basics of the Yammer platform, including how to use Yammer Embed in your existing business applications. Yammer Embed is a simple way to integrate your line-of-business application. The main challenge with Yammer Embed is that it does not provide deep integration between Yammer and your line-of-business applications when you want to read or write data into Yammer. Also, if you want to enable single sign-on in your business applications, that requires a deeper understanding of the Yammer platform.

The first step toward the deep integration of Yammer and your line-of-business applications is understanding the concepts surrounding a Yammer app. In this chapter, we will cover the basics of Yammer apps, including how to register your app with Yammer and how to manage your Yammer apps.

What Is a Yammer App?

Yammer apps provide a way to deeply integrate Yammer and your other line-of-business applications. As a developer, you register a Yammer app on your company’s Yammer network and use Yammer APIs and SDKs to build custom applications. This provides great flexibility around how your custom applications interact with Yammer.

Let’s use an example to explain the concept of the Yammer app. Suppose you are a Microsoft Dynamics CRM developer in SPDS and you want to offer an integration between Microsoft Dynamics CRM with Yammer. Business users want to be able to notify all the members of a Yammer Sales group directly from Microsoft Dynamic CRM each time a new opportunity is created. To build this feature, a deeper integration between Microsoft Dynamics CRM and Yammer is required.

The first thing you need to do is register a new Yammer app. Once your Yammer app is registered on the Yammer network, you will then use the key values provided by Yammer to develop custom applications to integrate Microsoft Dynamics CRM with Yammer.

As illustrated in Figure 3-1, the Yammer architecture allows different technology platforms to integrate with Yammer using a Yammer app.

9781484209448_Fig03-01.jpg

Figure 3-1. High-Level architecture view of integrating Yammer with other platforms using a Yammer app

Figure 3-1 gives you a high-level view of how to develop your line-of-business applications hosted on different development platforms to integrate with Yammer using Yammer apps. The key is that none of the business applications with custom code are hosted on Yammer. Rather, those applications are hosted outside of Yammer. When you write code to read and write data from Yammer, that code executes on its own hosting platform and a registered Yammer app plays an important role in providing a channel for writing or reading data from Yammer into your line-of-business applications.

As a developer, you have to register the Yammer app in your company’s Yammer network to integrate with the line-of-business applications. Therefore, in the following section, we will explain how to register a Yammer app.

Registering a Yammer App

There are no restrictions on creating Yammer apps and the good thing about this is that no approvals are required to create, build, and test Yammer apps either. Users can register a new Yammer app on their Yammer home network using the Yammer web interface.

Let’s start by registering a new SPDS University Yammer app, which we will be using in our integration examples later in this book. The purpose of the SPDS University Yammer app is to provide an integration channel between Yammer and other line-of-business applications of SPDS, which is mentioned in the case study. This Yammer app will allow business applications like the SPDS University ASP.NET application, the SPDS University SharePoint portal, and the SPDS University Windows phone app to read and write data from Yammer. You will learn integration of all the above-mentioned line-of-business applications with Yammer in the remaining chapters.

Here are the detailed steps for registering a new Yammer app on your Yammer network.

  1. Log in to the Yammer network.
  2. On your Yammer home page, click on the three dots (. . .), as shown in Figure 3-2.

    9781484209448_Fig03-02.jpg

    Figure 3-2. Creating a new Yammer app using the Yammer user interface

  3. From the drop-down menu, click on Created Apps.
  4. You will be presented with the Registered Applications page, as shown in Figure 3-3. It lists all your registered applications.

    9781484209448_Fig03-03.jpg

    Figure 3-3. The list of registered applications by the logged-in user

    Image Note  If you do not see the Created Apps menu, visit https://www.Yammer.com/client_Applications.

  5. To register a new Yammer app, click on the green Register New App button, as shown in Figure 3-3.
  6. Enter the details of your new Yammer app. Figure 3-4 shows all the required fields for the SPDS University Yammer app registration.

    9781484209448_Fig03-04.jpg

    Figure 3-4. New Yammer app registration screen

    You also have to agree on the Yammer API terms and conditions before registering your Yammer app.

    Table 3-1 provides a description of each field required for app registration.

    Table 3-1. Yammer App Registration Fields

    Field

    Description

    Application Name

    The application name entered here will be the one that is used in the Yammer application directory and is visible on all Yammer activities. You can also modify the application name later by editing the Yammer App configuration details.

    Organization

    The name of the organization affiliated with your app. Normally your company name.

    Support Email

    An email address, which users of your app can contact for support.

    Web Site

    Your organization’s web site.

    Redirect URI

    URL where Yammer will redirect after the OAuth2.0 authentication flow is complete. This is a requirement of the OAuth 2.0 specification and must be present for applications to be authorized by URLs. In short, it is a URL that you control and is a key part of the multi-step OAuth authentication process. As with all application URLs, this Redirect URI should use SSL to protect the authentication process. You will learn about using the Redirect URI in a Yammer authorization process in Chapter 4.

  7. Click the Continue button to register the new Yammer app.
  8. Once the Yammer app is successfully registered, Yammer allocates two important values—ClientID and Client Secret—to the Yammer app. These values are unique for each Yammer app and are required for OAuth authorization to Yammer from any external applications. You can view these values from the default page of the app labeled “Keys and Tokens,” as shown in Figure 3-5.

9781484209448_Fig03-05.jpg

Figure 3-5. Registered Yammer app’s Keys and Tokens information

This Yammer app is now ready for integrations with other business applications. One important point to consider here is that the SPDS University Yammer app is registered under the Yammer home network.

When you register your Yammer app, it will be available only on your home network because Yammer sets the global flag to false. Apps without a global flag set are available only to the home network of the Yammer app. Developers and other users of the home network can use these local apps, but they won’t be available to others outside your network until you publish them to Yammer’s Global App Directory.

As shown in Figure 3-6, you can view and manage all registered apps on your home network. The user who is logged in to the system owns the listed Yammer apps.

9781484209448_Fig03-06.jpg

Figure 3-6. Yammer apps under the home network

In the next section, we will explore additional Yammer app configuration considerations using the Yammer user interface. You will also learn how to publish your Yammer app to the Global App Directory.

Configuring Yammer App Registration Details

Once your Yammer app is registered, you can configure additional information related to it. As illustrated in Figure 3-7, there are three sections—Basic Info, App Directory, and Open Graph.

9781484209448_Fig03-07.jpg

Figure 3-7. The Yammer app’s configuraiton sections

Let’s start with the Basic Info section.

Editing the Basic Info

The Basic Info link (Figure 3-8) on left side of the navigation under My App allows you as the owner of the app to edit the basic info that you entered while registering the Yammer. You can also enter additional details about the Yammer app.

9781484209448_Fig03-08.jpg

Figure 3-8. The Yammer app’s basic info

Notice that the installation information section has some additional fields that were not presented when first registering the Yammer app. Let’s examine these now.

Redirect URI and JavaScript Origins are two important properties that are used in OAuth 2.0 authentication and play important role in the entire process that makes end users’ experiences easy and smooth, particularly the Redirect URI.

The Redirect URI is the URL of the site or page to redirect. Users will be redirected to the redirect URI, and generally this will be the URL of the site’s home page or a landing page for the Yammer users for retrieval of access tokens. As with all application URLs, this Redirect URI should use SSL to protect the authentication process. Your Redirect URI will vary depending on how your line-of-business application is configured. Table 3-2 shows examples for static and dynamic domains.

Table 3-2. Redirect URI Examples for Static and Dynamic Domains

Domain Usage

Redirect URls Example

Static domain configured for all users of the application

https://www.application.com

https://dev.application.com

Dynamic subdomains for multiple users, for example, https://[instance-name].application.com

https://application.com

The second important parameter is JavaScript Origins. It is the value of the application from where you will execute the code (your application code). For the majority of cases, it is the domain address of your application that will make REST API calls to Yammer using the JavaScript SDK. The JavaScript Origin field should be updated with all the URLs if you access Yammer REST APIs from different applications. Ensure that each of these origins is configured on a new line. Whenever possible, it is best to register domains that support SSL/TLS encryption.

Image Caution  If you do not configure JavaScript Origin for your Yammer app, it is possible that the Yammer OAuth authentication will not work.

Configuring App Directory Settings

The second set of configuration options available in the web interface relate to your app directory settings. To understand these, you first need to understand the Yammer app directory.

What Is the Yammer App Directory?

From the end user’s point of view, the Yammer app directory provides an easy way to discover new Yammer apps and install them in minutes. You can also visit https://www.Yammer.com/Apps to view the published apps in the app directory or click the dots “. . .” on your Yammer page, as illustrated in Figure 3-9.

9781484209448_Fig03-09.jpg

Figure 3-9. The Yammer app directory

Under the app directory, you can see the featured apps that Yammer shares with you, as illustrated in Figure 3-10. These apps are from different vendors who have developed generic Yammer integration apps that you can use based on available features. You can also see apps that your colleagues are using, as well as your installed apps.

9781484209448_Fig03-10.jpg

Figure 3-10. The Yammer app directory showing the Featured Apps, App Carousel, and Colleagues Are Using sections

The Yammer app directory and App Carousel provides an easy way for developers to publish their Yammer apps to a wider audience if they want to develop integrations for their publicly available services. You can see apps for publicly available apps like Sched.do or mindflash in the Yammer app directory.

Configuration Options

As shown earlier in Figure 3-7, you can navigate to the App Directory configuration setting by using the app directory link on the App Configuration page.

In this section, the majority of the fields are self-explanatory. You can get further info about them by clicking the “?” button next to each field.

The first field is Category. Select a category that best applies to your Yammer app and then enter a detailed description that will help Yammer users intuit its features.

In the Installation Information section, specify the terms of service URL and private policy URL, as your Yammer app is going to be used by many users, especially if you want to make a business application (like Sched.Do or mindflash.com). In this section we specify the Redirect URI that we talked about in detail earlier in this chapter. You’ll also learn more about it in Chapter 4.

9781484209448_Fig03-11.jpg

Figure 3-11. The Yammer app’s app directory configuration

It is also useful to upload images for the Yammer app’s icon, banner images, and collection of screenshots that can provide visual representation to users about your Yammer app before they actually experience it. You can add up to four screenshots in the App Directory configuration screen, as shown in Figure 3-12.

9781484209448_Fig03-12.jpg

Figure 3-12. Yammer app’s app directory configuration for icons, banner images, and screenshots

By default, when developers register their Yammer apps, it is best to do so to the home network only. To deploy a Yammer app to the Global App Directory, you need to submit your app to the Yammer support team. The Yammer support team will then contact you to ensure your app is ready to be added to the Yammer app directory. Your app can also be promoted to the Yammer App Carousel or to the featured apps, but that is based on your discussion with Yammer. Developers also have to read and sign the Yammer app directory agreement before submitting their app.

In the next section, you will learn about two different networks where you can deploy your Yammer app.

Submitting Your App to the Global App Directory

In order to deploy their Yammer apps to the Global App Directory, developers need to go through a vetting process with Yammer, and if approved, their app will be marked “Global” and will then be listed in the Global App Directory. Developers need to submit their apps by using the Yammer user interface, as shown in Figure 3-13. They do this to the Yammer support team using Yammer App’s Global Directory menu on the Yammer app configuration page. Once you’ve submitted your app, the Yammer support team will meet with you to ensure your app is feature-ready and good enough to be added to the Yammer app directory. Before submitting your app for review, ensure that you have completed app directory configuration sections, designed your web site and landing page for the app, and prepared some marketing materials. Your app may even be promoted in the featured Yammer App Carousel or on the Yammer blog.

9781484209448_Fig03-13.jpg

Figure 3-13. Yammer apps in the Global directoryk

Once your Yammer app is marked as global, it will be listed in the Global App Directory, as shown in Figure 3-14.

9781484209448_Fig03-14.jpg

Figure 3-14. Yammer apps in the Global directory

Users from all networks can discover and experience the apps listed in the Global Apps Directory and can benefit from the extended functionality they offer.

Image Note  If you want to know more about how to publish a Yammer app in the Yammer app directly, refer to https://developer.Yammer.com.

Configuring Open Graph

The next section on the Yammer app’s configuration page is Open Graph. As mentioned in Chapter 1, Open Graph (OG) is a lightweight data integration protocol that allows developers to define an activity and post it to Yammer as an Open Graph object.

Yammer’s Open Graph protocol provides many out-of-the-box objects that you can use to write data into Yammer. It also allows you to configure custom Open Graph objects and action types. The Open Graph configuration page of the Yammer app is where you can specify custom Open Graph objects and action types, as shown in Figure 3-15.

9781484209448_Fig03-15.jpg

Figure 3-15. Yammer app’s custom Open Graph object types and action types

Chapter 5 covers the Open Graph protocol, which focuses on using the Open Graph protocol to write data into Yammer. You will learn how to create and use custom Open Graph objects in Chapter 5 as well.

Summary

In this chapter you learned about Yammer apps and the configuration of a Yammer app for the app directory. Yammer app registration is a simple process completed on the home network, whereby you can register, build, and test your apps. You also learned that from the Yammer app configuration page, you can submit your Yammer app to the Global App Directory for wider audiences.

In the next chapter, you learn how to implement Yammer authentication using the Yammer app called SPDS University that you registered in this chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset