How To Connect Graph Api V2.1 With Old Facebook PHP SDK
https://www.phpflow.com/facebook/how-connect-graph-api-v2-1-with-old-facebook-php-sdk/
How To Connect Graph Api V2.1 With Old Facebook PHP SDK
Last Updated On: December 4, 2015| By: Parvez
Normally people who was created his Facebook apps before april 2012 used PHP SDK 3.2.The PHP sdk 3.2 has only two files and now PHP SDK 4.0 has number of files to handle graph api. Some people has updated his app functionality with PHP SDk 4.0 but some people don’t want to update his PHP SDK. He just want to use graph api 2.1 with old sdk. PHP sdk 3.2 used graph api non-versioning manner that’s means he does not mention version number in his graph api request, The sample request of old sdk is below:
1
https://graph.facebook.com/me/
When user does not mentioned graph version on his request then Facebook used old version of his garph api.
How to used api version with old API:
we need add version number on graph url like below on base_facebook.php
library file:
12345
public static $DOMAIN_MAP = array( 'graph' => 'https://graph.facebook.com/v2.1/', 'graph_video' => 'https://graph-video.facebook.com/v2.1', 'www' => 'https://www.facebook.com/', );
New request would be:
1
https://graph.facebook.com/v2.1/me/
I hopes it help you.
Last updated