1

I'm working on a Windows Phone Silverlight app and I want to make a simple login via Facebook(browser). Is there a way to check if the user is logged in Facebook? I redirect the user to Facebook page with this statement:

Launcher.LaunchUriAsync(new Uri("http://www.facebook.com"));
nick
  • 1,611
  • 4
  • 20
  • 35

2 Answers2

0

I don't know if you are using the windows SDK for facebook (https://github.com/Microsoft/winsdkfb) but it is a third party sdk approved by Facebook.

Before using that SDK you should set up the Facebook developer page for your app. (https://developers.facebook.com/docs/apis-and-sdks)

I hope that helps.

Cabrra
  • 644
  • 3
  • 14
  • 28
0

Here is a WPF example that uses the WebBrowser class to get a token: Facebook OAuth in WPF & C# Example

Obviously the WPF related things might differ a bit, but it should at least point you to getting the info you need out of the process. As far as checking whether the user is logged in, I pretty much just checked whether the token is valid by making some http request that uses it and seeing whether it was successful (used a REST client for that).

There was a way to directly check token validity via the Facebook APIs but that was deprecated last I checked.

Community
  • 1
  • 1
Jack S
  • 11
  • 2