问题
My website that parses Facebook feed suddenly stopped to work with following error message: " location field is deprecated for versions v2.3 and higher", "type": "OAuthException", "code": 12"
I am making only two calls to the Facebook graph:
$authToken = fetchUrl("https://graph.facebook.com/v2.2/oauth/access_token?grant_type=client_credentials&client_id={$appId}&client_secret={$appSecret}");
//print_r($authToken); //1
$json_object = fetchUrl("https://graph.facebook.com/v2.2/{$page_id}/feed?{$authToken}&limit={$limit}");
displayData($json_object); //2
- gets the authentication token
- Tries to access the page feed.
I don't add any location paramaters, therefore I don't understand why it doesn't work? Any help will be appreciated. Janusz
回答1:
Wow! It was the limit (&limit={$limit}) paramater in the query:
$json_object = fetchUrl("https://graph.facebook.com/v2.2/{$page_id}/feed?{$authToken}&limit={$limit}");
Once I removed everything started to work like it should.
来源:https://stackoverflow.com/questions/31481001/facebook-sdk-location-field-is-deprecated-for-versions-v2-3-and-higher