rynqs / facebook-windows-phone-sample

Windows Phone 7 Sample using Facebook C# SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Facebook C# SDK Sample with Windows Phone 7

This sample demonstrates the use of Facebook C# SDK v6 as a Windows Phone 7 Application.

Note: This sample does not necessarily demonstrate the best use but rather features of using Facebook C# SDK on a Windows Phone 7 app. Always remember to handle exceptions.

Getting started

Set the appropriate AppId in FacebookLoginPage.xaml.cs before running the sample.

private const string AppId = "app_id";

Note:

  • For new projects using Facebook C# SDK which use anonymous objects as parameters make sure to add [assembly: InternalsVisibleTo("Facebook")] in AssemblyInfo.cs.
  • When updating UI in callback make sure to execute it in the appropriate thread. This can be solved by using Dispatcher.Invoke() method.
  • Create new instance of FacebookClient for each XAsync method calls in order to avoid the event handler from being fired multiple times.

About

Windows Phone 7 Sample using Facebook C# SDK

License:Apache License 2.0