0

Is there a way to know if the user info being returned by the graph api explorer is a user's profile or a business page?

The query I am using is: me?fields=feed{from,comments{from}}

which gives me back all the users who have left a comment or a post on my page.

Here is an example of what I would get back for that query:

{
  "feed": {
    "data": [
      {
        "from": {
          "name": "John's Tires",
          "id": "114615108955555"
      }, 
      {
         "from": {
         "name": "John Smith",
         "id": "123615108951010"
          },

Is there something I can add to the query to make it return a user type? For example- type:user or type:page?

I've searched facebook graph api documentation and found nothing. Thanks in advance for your help.

MAB
  • 43
  • 2
  • 7

1 Answers1

0

With metadata=1 you get a type in the response for a single top level item, but I don't know how to do it for a list.

$ fbapi /me?metadata=1 | jq .metadata.type
"user"
$ fbapi /BBCQuestionTime?metadata=1 | jq .metadata.type
"page"
Yuri Schimke
  • 12,435
  • 3
  • 35
  • 69
  • Hey Yuri, thanks for the answer. I found another solution using: {user-id}?metadata=1&fields=name,metadata{type} OR {page-id}?metadata=1&fields=name,metadata{type} – MAB Jul 08 '16 at 19:22
  • Add this as a separate answer, this is a better answer than mine. – Yuri Schimke Jul 08 '16 at 20:27