Mani
Mani

Reputation: 1374

MethodAccessException in using facebook c#sdk for windows phone 8.1 silverlight

Message for the exception is

Message "Attempt by method 'Facebook.Client.AppAuthenticationHelper.GetQueryStringValueFromUri(System.String, System.String)' to access method 'Facebook.HttpHelper.UrlDecode(System.String)' failed." string

The extension that I wrote in WMAppManifest.xml is as follow

<Extensions>
  <Protocol Name="fb861850377206***" NavUriFragment="encodedLaunchUri=%s" TaskID="_default" />
  <Protocol Name="msft-a3c419***65b42b1841692f386c4d190" NavUriFragment="encodedLaunchUri=%s" TaskID="_default" />
</Extensions>

I have created an app in facebook with the same product id but leaving msft. app created with following properties. I have created a login button and when I click, it takes me to browser and there it authorizes but in the callback I get this error. What could be the problem?

Upvotes: 1

Views: 186

Answers (1)

kshitijgandhi
kshitijgandhi

Reputation: 1532

A change was updated to the Facebook SDK today itself and I was able to get it working as follows-

  1. Download the source code from https://github.com/facebook-csharp-sdk/facebook-winclient-sdk. I don't know if it works when installing from NuGet. I just got it working after fetching the source code.
  2. Build the source code. You should now have Facebook.dll and Facebook.Client.dll in the build folder.
  3. Reference these dlls in your project and follow the instructions on the project site and it should work then.

Upvotes: 1

Related Questions