Facebook SDK location field is deprecated for versions v2.3 and higher

我的梦境 提交于 2019-12-13 04:55:56

问题


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
  1. gets the authentication token
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!