问题
It seems that Facebook now wants us to call versioned endpoints of the Graph API. E.g., https://graph.facebook.com/v2.0/me...
Does the Facebook SDK for .NET make versioned calls? Do I/can I do something to specify the version?
回答1:
Sanjeev got it, there is a parameter you can add to specify version:
FacebookClient fbClient = new FacebookClient();
fbClient.Version = "v2.2";
fbClient.Post("me/feed", new
{
message = string.Format("Hello version 2.2! - Try #2"),
access_token = "youraccesstokenhere"
});
If you are not specifying a version, it'll default to the oldest supported version: https://developers.facebook.com/docs/apps/versions#unversioned_calls
Facebook will warn you that you are nearing end of support for that version.
Don't take any chances that the auto-upgrade to newer version will work, better to develop, test and deliver with the latest version.
来源:https://stackoverflow.com/questions/28458334/how-to-call-versioned-graph-api-services-in-facebook-net-sdk