I'm the author of a Wordpress plugin that leverages the Facebook Graph API. Recently, some Graph calls are failing for new plugin users (only new users are affected). After some digging, I believe I've stumbled on the cause here: https://developers.facebook.com/docs/apps/versions
In particular, the section "Can my app make calls to versions older than the current version?" states:
An app can make calls to the version of the API that was the latest available when the app was created
In other words, even if my Graph calls specify an explicit version (i.e. https://graph.facebook.com/v2.0/me), for newly-created apps, Facebook will simply ignore the "v2.0" and call into 2.1. Indeed, an FQL query like:
https://graph.facebook.com/v2.0/fql?q=(myquery)&access_token=(mytoken)
Yields:
"error": {
"message": "(#12) fql is deprecated for versions v2.1 and higher",
"type": "OAuthException",
"code": 12
So that leads to my first question: Am I missing something here? To me, this behavior seems to make versioning pretty much useless; whether or not my calls specify v2.0, Facebook will just call into the newest version that existed when that app happened to have been created. So the two-year time window Facebook gives for supporting old api versions (see https://developers.facebook.com/docs/apps/upgrading) does nothing, as I always need to support the most-current version the moment it's released (or new users with newly-created apps will be broken). Right?
Second question (assuming the above is correct): How can I query Facebook for the version that's being used (or rather, available to be used) by the current app? Since specifying v2.0 clearly doesn't mean it'll actually use v2.0, finding out if it's using an unexpected version could at least help preempt possible errors - i.e. it'd be valuable info to include with user bug reports. I expect that this information must somehow be in the access_token, but I've searched high and low and can't figure out how to ask, "What API version does this token apply to" (or perhaps, "What's API versions does this app support," or similar)?