Facebook Graph API + Facebook Pages

后端 未结 9 1601
温柔的废话
温柔的废话 2021-02-06 09:17

Using Facebook\'s Graph API, given a username xyz (assuming they\'ve authenticated my site), how do I get a list of all of the facebook pages that the user administers?

9条回答
  •  死守一世寂寞
    2021-02-06 09:54

    After getting access token you can get all details of list of all of the facebook pages that the user administers.

    https://graph.facebook.com/[FACEBOOKUSERID]?metadata=1&access_token=
    

    The output will look like

    {
       "name": "Facebook Developer Garage Austin - SXSW Edition",
       "metadata": {
          "connections": {
             "feed": "http://graph.facebook.com/331218348435/feed",
             "picture": "https://graph.facebook.com/331218348435/picture",
             "invited": "https://graph.facebook.com/331218348435/invited",
             "attending": "https://graph.facebook.com/331218348435/attending",
             "maybe": "https://graph.facebook.com/331218348435/maybe",
             "noreply": "https://graph.facebook.com/331218348435/noreply",
             "declined": "https://graph.facebook.com/331218348435/declined"
          }
       }
    }
    

提交回复
热议问题