Version 2.0 of Facebook API


#1

Hi Everyone,

There have been some recent changes to the Facebook API that may break existing items using it. These items need to be updated as soon as possible.

Edit: Because of delays in sending the email promised below, we have extended the target completion date from 18 August to 1 September 2014.

Key Points

  • Existing items using the Facebook API must be updated to use Version 2.0 of the API by 1 September 2014 or they will be soft disabled. Please note we will be notifying all authors of affected items by e-mail within 7 days of posting this announcement. We will also notify any author whose item is consequently soft disabled after 1 September.
  • New items using the Facebook API will not be accepted unless they use Version 2.0 of the API, with immediate effect.
  • Items designed to work with Version 2.0 of the API key should have a tag of 'facebook 2.0 api'.

Background

On 30 April 2014, Facebook released Version 2.0 of their API. Although Version 1.0 will continue to work until 30 April 2015, apps created after 30 April 2014 will not be able to make calls to it. They must use Version 2.0. You can read more here: https://developers.facebook.com/docs/apps/changelog

Buyers purchasing an item from CodeCanyon that uses Version 1.0 of the Facebook API, will not be able to use it. As the item will be registered with Facebook after 30 April 2014, it will only work with Version 2 of the API.

Requirements

If you are the author of an item that uses the Facebook API, you need to make sure it is updated to work with Version 2.0 of the API as soon as possible. If this is not done by 1 September 2014, the item will be soft disabled (and you will be contacted by e-mail) until such time that it has been updated.

Additionally, new items that use the Facebook API will only be accepted if they work with Version 2.0 of the API. New items that only work with Version 1.0 will not be accepted.

To allow us to track items that do work with the version 2.0 of the API, can you please add a ‘facebook 2.0 api’ to items that do work with Version 2.0 of the API. This will also allow buyers to identify whether an item is ‘safe’ to purchase.


#2

Of interest how will you know what version of the API a plugin uses? Do you have a method for searching the code of all uploaded items to determine this?


#3
michaeldale said

Of interest how will you know what version of the API a plugin uses? Do you have a method for searching the code of all uploaded items to determine this?

Looks like they’re going off the item description/tags. Anything that doesn’t have facebook 2.0 api in it will be notified/soft disabled. Or they could have some super cool ninja way of examining item code/content in bulk.


#4

Yes but how do they know if a plugin uses the Facebook SDK at all?


#5

Sorry, no super cool ninja tricks. We have a list of items that we believe use the Facebook API. We’ll be performing a manual check of these items to confirm whether they do use the API and, if so, which version they use.

Cheers,
Stephen


#6

Aw, I was hoping for some grep awesomeness!

Reminds me that one of my apps is probably using V1 of the Facebook SDK. I wonder how easy it is to swap it out.


#7
michaeldale said

Reminds me that one of my apps is probably using V1 of the Facebook SDK. I wonder how easy it is to swap it out.

I couldn’t tell you how easy / hard it is to make the change, but it’s something that needs to be done. You should be able to learn more at Facebook’s site. Best of luck!


#8

I already updated my item about one month ago. It is very easy :slight_smile:


#9

Hi Stephen,

We have a facebook like widget in our theme. I don’t think that needs to be reviewed according to the new API guidelines. Are we clear on that?

Thanks,

  • M

#10

It’s shame as Facebook PHP SDK V4 (php-sdk-v4) Requires at least PHP 5.4 and many hosting companies are not yet hosting PHP 5.4


#11
ThemeFusion said

We have a facebook like widget in our theme. I don’t think that needs to be reviewed according to the new API guidelines. Are we clear on that?

Hi Muhammad,

We don’t believe that Like widgets need to be updated, so you should be fine. Thanks.

Cheers,
Stephen


#12
Gejadze said

It’s shame as Facebook PHP SDK V4 (php-sdk-v4) Requires at least PHP 5.4 and many hosting companies are not yet hosting PHP 5.4

I’ve already had to move away from WP Engine just recently because they’re stuck on PHP 5.3.x after raising a support ticket and basically being told to leave if I didn’t like it. This is now just another reason WP Engine may lose more customers or have to upgrade.


#13

Hi Stephen,

Is there any simple way to update the tags to add the “facebook 2.0 api” when the item is already based on the new Facebook API version, other then having to re-upload the full item and redo a review process just to add a new tag?


#14
yougapi said

Is there any simple way to update the tags to add the “facebook 2.0 api” when the item is already based on the new Facebook API version, other then having to re-upload the full item and redo a review process just to add a new tag?

Hi Yougapi,

You need to submit with the new tag and it will still need to go through the review process, but you don’t actually need to upload the item. Hope that makes sense.

Cheers,
Stephen


#15

Hi All,

Just a note that because of delays in sending the email promised above, we have extended the target completion date from 18 August to 1 September 2014.

Cheers,
Stephen


#16

As an advice for other authors who have projects using facebook api,

  • Facebook php sdk by default use the api v2
    ,All permissions in the api v2 needs to be Reviewed first.
  • so here you find yourself in the middle of a problem you can’t switch the php sdk to version 2 of facebook api.

::Solution::

Change
$facebook->api(’/me’);
To
$facebook->api(‘v1.0/me’);

  • A smart way to change all your requests
    Using Sublime text or Notepad++ , Press Ctrl + f and select find in files,
    Then Replace $facebook->api( to be $facebook->api( ‘v1.0’ .
    adding " ‘v1.0’ . "

Will work till August 2015

Thanks.


#17

@iSocial You should know that the API requests made through Facebook apps created after April 30, 14, will automatically redirect to the Facebook v2.0, even though the v1.0 is specified, so the solution to just call the v1.0 may work for older apps, but will not work for newly created Facebook apps

Better to update the full app to v2.0 exclusively, if you want your app to have a consistant behaviour with any Facebook app regardless of its creation date :wink:

Thanks for the info @StephenCronin


#18

Hi @StephenCronin,

For the latest version of facebook api, I will use facebook’s latest sdk for PHP. And that sdk needs at least PHP 5.4.x . Do you think it is a good idea to force users to upgrade their php version to 5.4? Most hosting providers do not support this version of PHP.

Thanks in advance
Hüseyin


#19

You could use the slightly older SDK ( https://github.com/facebook/facebook-php-sdk ) if you’re worried about PHP 5.4 support. It should still work fine.


#20
cubuzoa said

For the latest version of facebook api, I will use facebook’s latest sdk for PHP. And that sdk needs at least PHP 5.4.x . Do you think it is a good idea to force users to upgrade their php version to 5.4? Most hosting providers do not support this version of PHP.

Hi Hüseyin,

I understand your concern.

PHP 5.4 has been out for almost two and a half years and PHP 5.3 is past the scheduled end of life date, so any decent hosting providers should have upgraded by now. Still, I’m sure there are quite a few hosts who haven’t updated yet.

However, in this case, we don’t really have much of a choice. Some buyers using older version of PHP may be affected, but that’s better than all new buyers being unable to get the item to talk to the API.

Cheers,
Stephen