代码之家  ›  专栏  ›  技术社区  ›  Eoin Coogan

PHP:Facebook SDK位置API不适用于v2.0及更高版本

  •  0
  • Eoin Coogan  · 技术社区  · 7 年前

    $profile_request = $fb->get('/me?fields=first_name,last_name,email,gender');
    $requestLikes = $fb->get('/me/likes?limit=20');
    $requestlocation = $fb->get('/me/locations');
    
    $profile = $profile_request->getGraphNode()->asArray();
    $likes = $requestLikes->getGraphEdge();
    $location = $requestlocation->getGraphNode()->asArray();
    

    我的错误:

    Graph返回错误:(#12)对于v2.0及更高版本,不推荐使用locations API

    1 回复  |  直到 7 年前
        1
  •  0
  •   Eoin Coogan    7 年前

    好的,我解决了。我不知道为什么,但当我用数组配置文件[]获取“位置”时,我能够检索到它。现在还不清楚为什么会这样。