Search code examples
facebookfacebook-graph-apiwindows-phone-8facebook-c#-sdkfacebooksdk.net

Facebook.Client WP8 uses which Facebook API version?


I've been using the NuGets from Outercurve Foundation (Facebook and Facebook.Client) and I've just updated to the latest stable version for both of them since Facebook API 2.0 and 2.1 will be depricated on the 7th August 2016 and they are forcing us to use the later verstions of their API.

Here is the thing... the website facebooksdk.net which had documentation and such was down for some time and now it redirects to hackerapp.com which has no documentation whatsoever...

Does any one know the version of Facebook API that the NuGet Facebook 7.0.6 and Facebook.Client 1.0.4 are using?

I think that the facebook button (from Facebook.client) is using the 2.1 version of the API. because I saw it in the query when it opens the browser just before the login prompt.

Does any one know which version is used? and if there is another way to login using the 2.5 or 2.6 API version?


Solution

  • I believe the client does not enforce any API version, so it will make unversioned calls. And in this case, it will use the default API version that is set on your Facebook App...

    You can check the default API version for your app in your app's dashboard in https://developers.facebook.com

    Mine is currently v2.0 (I don't know yet how to change manually that version. Facebook will certainly upgrade it when v2.0 expires)

    enter image description here

    enter image description here

    I am using an even older version of the nuget package (6.4.2) and was able to override the version simply setting it in the endpoint being called:

    Exmaple:

    var client = new FacebookClient(accessToken);
    
    dynamic facebookUser = client.Get("me"); //this will use v2.0 currently (default API version)
    dynamic facebookUser = client.Get("v2.6/me"); //this will use v2.6
    

    PS: version 2.0 will expire 7th August 2016... version 2.1 will expire only in 30 October 2016 (2 years after 2.2 was launched)