Inhalt
Since we get close to the Sundown of the FAcebook Graph API 1.0 now all APPs have to be updated till end of April 30. Here a short log how we run it and what functions to take care for both Javascript and PHP SDK s based apps. At the end some links from Facebook Dev Guide for migration.
What will change and what will be gone for ever in the new API2.0 last recent version API 2.4 step by step.
Core Changes :
FQL is gone from upgrade
Login Flow : New Facebook Login all additional Permission need now a Review by Facebook valid for all new apps since 30. April 2014
Changed API Endpoints
New URL graph endpoint
graph.facebook.com/?id={url}
Migration Plan
Migration 2.0 To 2.3 what is new ?
Graph API 2.0 Migration from Games
This Post is Work in Progress soon more
Facebook Javascript Migration for API 2.0
1. Change FB.INIT
Add the version you upgrade to in our case 2.3
FB.init({ appId : '{app-id}', version : 'v2.3' });
2. Change Facebook javascript library
from Version 1.0
js.src = "//connect.facebook.net/en_US/all.js";
to Version 2.0
js.src = "//connect.facebook.net/en_US/sdk.js";
Update Social Plugins code
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s);
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#version=v2.0&xfbml=1&appId=113263196637420";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div
class="fb-like"
data-href="https://blog.metaprime.at/"
data-layout="standard"
data-action="like"
data-show-faces="true"
data-share="true">
</div>
After update all calls to the API automatically go from FB.api(‘/me’, …); to FB.api(‘/2.0/me’, …);
Facebook SDK ERRORs that could happen
invalid version specified :
check if <div id=”fb-root”></div> is present right after Body opening. Last but not least don’t forget the Version Format V v2.3 for the Version String .
FB.init has already been called – this could indicate a problem
Facebook Permission change for Graph API 2.0
PERSON Related Permissions
manage_friendlist : Is now desperated only List name will be returned
user_friends :
PAGE Relted Permissions
NEW Permissions and endpoints
Taggable Friends API and Inviteable Friends API the invite api is only available for Games
Removed Graph Endpoints and Permission FOR Graph APi 2.0
Apps should not call for following permission and endpoint .That will affect most Friendslist management ,Event Manager apps , Question for USER removed and Friends Analytic Apps.
-
create_event
manage_friendlists
read_requests
user_checkins
user_notes
user_online_presence
user_questions
user_subscriptions
xmpp_login
friends_about_me
friends_actions.books
friends_actions.fitness
friends_actions.music
friends_actions.news
friends_actions.video
friends_actions:APP_NAMESPACE
friends_activities
friends_birthday
friends_checkins
friends_education_history
friends_events
friends_games_activity
friends_groups
friends_hometown
friends_interests
friends_likes
friends_location
friends_notes
friends_online_presence
friends_photos
friends_questions
friends_relationships
friends_relationship_details
friends_religion_politics
friends_status
friends_subscriptions
friends_videos
friends_website
friends_work_history
GRAPH URL QUERIES replaced by new URL node
If you us the Graph API for URL Stats they announce a new Url node anyway i don’t see any difference expept that the url is now encoded and any access token is required now. It return a bit more details .
og_object | id | description | type | updated_time | url |
graph.facebook.com/?id= {url}
share
Share count will represent total interaktion Like + Share from these ulr .
Needs a non expiring access token . So no big changes for that part