Windows SDK for Facebook

We’re pleased to announce a new open source library for integrating Facebook into your Windows apps. The Windows SDK for Facebook is geared towards app developers creating Universal Windows apps on both desktop and phone. The SDK supports universal Windows app for Windows Phone 8.1, Windows 8.1 or Windows 10. Using this library, you can easily integrate Facebook Authorization, Like, Graph and other Facebook functionality into your app. This library is also fully native so the CLR is not a dependency. Features included are:

Authorization

Login

Logout

Login Button

Profile Picture control

Dialogs

Feed dialog

Request dialog

Graph

Custom Stories

Post to user’s feed

Upload Photo

Like a Page/Object

Where to Get the SDK

If you are developing a universal Windows app for Windows Phone 8.1, Windows 8.1 or Windows 10 and are currently using the Facebook .NET SDK (http://facebooksdk.net/), we recommend that you evaluate the new Windows SDK for Facebook for use in your app. The new Windows SDK features are listed on GitHub.

This new SDK carries forward the most popular capabilities of the existing .NET SDK. Should you identify any key features missing, please submit a feature request on the Windows SDK for Facebook GitHub repo.

Compilation Instructions

Compilation instructions for Windows apps are on the GitHub repo.

App Samples

Also included are sample projects that show how to integrate this library into your app. The sample projects show how to:

Log in

Display user information

Post to user timeline via feed dialog

Launch app request dialog to send requests to friends

Display the list of user’s likes

We have multiple samples on the GitHub repo. Below are some code snippets in C# and C++ showing how to do a login and get a user’s likes.

We’d like to encourage you to try the Windows SDK for Facebook. And, if you have suggestions for other open source projects that would help you make great apps, please let us know in the comments. For more information about Microsoft’s involvement with open source, check out these sites:

It is not currently in the SDK but would be possible to add. This feature would rely on the Facebook app implementing the fbconnect:// contract. Currently only the Facebook app for Windows Phone 8.1 supports this contract

Currently that isn’t supported, this was not a design goal for the first release. Since this is open source, please make a case for it on https://github.com/Microsoft/winsdkfb. Or better yet, since this is open source, you can implement the feature and submit a pull request.

The SDK NuGet package is not published to nuget.org at this time, but it may be built privately using our command-line build. We’re currently evaluating how best to provide prebuilt binaries for the SDK.

I’ve used this to build a plugin for Unity and its working great, so thanks for the awesome work.

I’m wondering if there is a way to auto log a user back in again? Looking at the implementation from Facebook, it uses cached data to recreate the session, but I haven’t seen anything similar with this SDK. Is there a way to do it?