Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我目前获取/me对象的方式:
/me
self.facebook_user = facebook.GraphAPI(access_token).get_object('me')
但是,例如,如果我只想从 请求name和id字段/me,我该如何构建请求?
name
id
您可以使用 **args 传入额外的查询参数:
graph = facebook.GraphAPI(access_token) profile = graph.get_object('me') args = {'fields' : 'id,name,email', } profile = graph.get_object('me', **args)