Facebook has updated the Graph API to version v2.1, making significant changes to how some of the API calls work while deprecating other features. The current Facebook PHP SDK stable version is still v4.0.9 and uses Graph API v2.0, but PHP SDK v4.1 will eventually make use of Graph API v2.1. Facebook has detailed the changes in the new version, which include removal of FQL and the REST API.
Facebook has also made a massive change to the Platform policy which now prohibits the use of “likegates” with applications. A change that is certainly going to affect many brands and companies that rely on the feature to increase their fan base. Facebook has updated the Platform Policy to say:
You must not incentivize people to use social plugins or to like a Page. This includes offering rewards, or gating apps or app content based on whether or not a person has liked a Page. It remains acceptable to incentivize people to login to your app, checkin at a place or enter a promotion on your app’s Page. To ensure quality connections and help businesses reach the people who matter to them, we want people to like Pages because they want to connect and hear from the business, not because of artificial incentives. We believe this update will benefit people and advertisers alike.
Any new apps created from August 7th 2014 will no longer have access to the liked
property. Also, from November 5th 2014, the liked
property will always return true
regardless of whether or not the person has liked the page. It means my Likegate tutorial will no longer work, but developers will be able to get the status of liked pages using the user_likes
permission (which requires approval from Facebook).
v2.1 Feature Highlights
- Pages are able to mention other Pages in posts published via the API. If you want to publish mentions of pages other than those managed by your app’s developers, you’ll need to submit for review by Facebook.
- /friends edge on the User object now provides access to total friend count. This is retroactively supported in v2.0 as well.
- The root node of v2.1 Graph API responses will always be a JSON object – rather than raw booleans, integers or strings.
- API v2.1 provides access to the data displayed in the new App Insights through a new ‘app_insights’ edge on the Application object.
- Field expansion syntax is now more concise.
- A new URL node makes it easier to access Open Graph and Share metadata for that URL.
Breaking Changes & Deprecations
- FQL and the REST API are not available in v2.1. They remain available in v1.0 until April 30, 2015 and v2.0 until August 7, 2016.
- The syntax for field expansion has become more concise in v2.1 — but the previous syntax will still be accepted. v1.0 and v2.0 have also been updated to now accept both the previous syntax and the new syntax.
- The Login Dialog no longer accepts the legacy return_session and session_version parameters.
- The /insights edge will be removed from the Application object in v1.0 and v2.0 on November 5, 2014 (90 days from today). You should update your apps to call/v2.1/{app_id}/app_insights instead.
- The liked field will no longer be returned in the page property of the signed_request object for Page Tab apps created from today onwards. For apps created before today, from November 5, 2014 (90 days from today), the liked property will always return true regardless of whether or not the person has liked the page.
- The Recommendations Bar social plugin has been deprecated. After Wednesday November 5, 2014 (90 days from today), the Recommendations Bar will no longer render on any website.
Does this affect the basic set up tutorial of yours? I deleted my app on my account to re accept new permissions. But now I have an error saying “this feature is not available”.
As mentioned in the article, new apps don’t have access to
liked
parameter anymore. The changes mean thatisLiked()
will no longer work for any app going forward.Nice article and sum up Niraj.
Bob you should not erase your app if it was older than 7 of Aug.