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