版本v2.3及更高版本的SDK SDK位置字段已弃用 [英] Facebook SDK location field is deprecated for versions v2.3 and higher

查看:123
本文介绍了版本v2.3及更高版本的SDK SDK位置字段已弃用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解析Facebook feed的网站突然停止工作,出现以下错误消息:
版本v2.3及更高版本,type:OAuthException,code:12



我只向Facebook图表打了两个电话:

  $ 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



<

  • 获取认证令牌

  • 尝试访问页面Feed。


  • $ b $我不会添加任何位置参数,因此我不明白为什么它不起作用
    任何帮助将不胜感激
    Janusz

    解决方案

    Wo w!这是查询中的限制(& limit = {$ limit})参数:

      $ json_object = fetchUrl https://graph.facebook.com/v2.2/{$page_id}/feed?{$authToken}&limit={$limit}); 

    一旦我删除了所有开始工作的东西,应该是这样。


    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

    解决方案

    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.

    这篇关于版本v2.3及更高版本的SDK SDK位置字段已弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆