Exercise 3: Consuming a provider
In exercise 3, you’ll learn how to consume your provider in Outlook and understand all of the ways that the OSC surfaces provider data.
- In Visual Studio, press F5 to start debugging your provider
Once Outlook starts, click on the Add-Ins tab on the ribbon.
Figure 9
Add-ins ribbon tab
You enabled the Toolbar Commands on the Add-Ins tab when you added keys to the registry in Exercise 1. Specifically, the ShowDebugButtons key shown below:
[HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\SocialConnector] "DebugProviders"=dword:00000001 "ShowDebugButtons"=dword:00000001
- Right-click on the TestProvider contact folder and choose Delete Folder
- Click on Synch Contacts. Observe that the OSC recreates the folder and synchronizes with the sample social service to add contacts to the folder.
- Click on the Inbox folder
- From the ribbon, select ViewPeople PaneNormal to ensure that the People Pane is visible
- Select any email item
In the People Pane, observe the Add button underneath the picture frame. This functionality allows you to add the selected contact to one of your social networks if the provider supports this feature. If you have already added the contact to one of your social networks, instead of an Add button, you’ll see the icon of the social network associated with the contact.
Figure 10
Social Network Icon
- From the ribbon, select Sync Feeds.
- Observe that your Social Service console shows the output sent back to your OSC provider.
- Click on the News Feed folder in Outlook.
Observe that you have numerous items in the folder.
- Click on the first item in the list
- In the People Pane, click on the 2nd tab (News feed) to view all of the news feed items associated with this person.
Observe that there are no other news feed items associated with this person. Further, Outlook is displaying a message that Search cannot return results for this view. This happens because you ran Visual Studio as administrator and when it launches Outlook to debug your project, it is running Outlook as administrator as well. Outlook uses Windows Desktop Search to surface related data in the People Pane but it is not available when Outlook is running with administrator permissions.
Figure 12
Outlook running without administrator permissions
- Close Outlook to stop debugging your project
- Start Outlook (using the Windows menu – not by debugging your project).
- Open the News Feed folder
- Click on the first Jan Kotas item
In the People Pane, observe that you can see other items attributed to Jan Kotas.
Figure 13
Outlook running with administrator permissions
- Disconnect from a Social Provider
- From the ribbon, select ViewPeople PaneAccount Settings
Click on the X associated with the TestProvider account to disassociate the TestProvider account with your Outlook account.
Figure 14
Social Network Accounts dialog
- Click Yes to remove the connection and delete the previously downloaded information.
- Observe that the News Feed data is removed along with the TestProvider contacts folder.
- Reconnect to the TestProvider
- From the ribbon, select ViewPeople PaneAccount Settings
- Check the box next to TestProvider
- Enter a User Name and Password (doesn’t matter what you enter for the TestProvider)
- Click Connect
- Click Finish
- Click Close
- Observe that news feed items appear in the News Feed folder and the TestProvider contact folder reappears.