6

In the facebook developer dashboard when I look at my app I see things like:

This app is public and available to all users
API Version: 2.4
App ID: ...
App secret: ...

How do I set API version 2.3 ? The field where 2.4 is displayed is disabled(grayed out) so I cannot edit it.

Aditya Zaqi
  • 303
  • 3
  • 12

2 Answers2

6

You cannot. v2.4 is the earliest version your app can call. The value depends on when the app was created and cannot be changed by you.

Code
  • 6,041
  • 4
  • 35
  • 75
  • 2
    Is it possible to upgrade it to higher version like 2.5? – Amorphous Oct 05 '16 at 20:52
  • 1
    @Amorphous There's no need to upgrade. If it states 2.4 you can use version 2.4 or later. – Code Oct 07 '16 at 12:56
  • I received a warning that I need to upgrade my app's API above 2.1, but I don't see anywhere on my app dashboard to do that? Where is the app API level set so I can upgrade it? Thx. – Ethan Brown Oct 31 '16 at 18:33
  • 2
    @EthanBrown You need to update your code to use the newer API. – Code Oct 31 '16 at 20:54
  • 2
    We updated our code from 2.1 to 2.8 last Friday but we only see now 2.2. How can we set it to at least 2.7 or something like that. In that way nobody can make any bugs with older versions. – LockTar Nov 01 '16 at 07:20
  • @RalphJansen AFAIK, it's not possible, unless you create a new Facebook App. – Code Nov 01 '16 at 12:54
  • Thank you, Code. I'm not seeing where the api level is set in facebook.php or base_facebook.php, but I might be missing it. – Ethan Brown Nov 01 '16 at 20:12
  • Review of the Facebook Developer notification email indicates they "automatically" upgraded my app to version 2.2. I tried it and it's working fine. Still not clear on how the api level is set and clarification is appreciated. – Ethan Brown Nov 01 '16 at 20:18
  • 1
    @EthanBrown When you use the API you have to connect to a certain version of it. If you don't know where you're setting it, search your entire code base for "2.1", "2.2", etc. – Code Nov 03 '16 at 22:26
0

You can't set an API level prior than the minimum available, but you can (and should) set one of the available ones. This page has a pretty exhaustive explanation, including the most common case where you don't specify an API version (either in the calls or in the SDK that you are using):

What happens if I don't specify a version for an API?

We refer to this as an unversioned call. An unversioned call will default to the oldest available version of the API. Consider this hypothetical life cycle of API versions:

pic

An unversioned call will always point to the oldest version still available at the top of the chart. This is currently v2.1, but after two years it'll be v2.2, then v2.3, etc.

Because of this, our recommendation is to always specify versions when making calls, where possible.

When using the JavaScript SDK for Facebook you can't make unversioned API calls.

Edoardo
  • 4,485
  • 1
  • 27
  • 31