Getting data from facebook API 2.4 graph

Can anyone help me get the data using the new Graph Api v2.4 on facebook, I previously used this url -

https://graph.facebook.com/ {user-id} / feed? limit = 1 & locale = en_GB & access_token = {access-token}

Previously, it provides all data (provides a json data view)

    "id": "12345_67890",
    "from": {
      "name": "xyz",
      "id": "123456"
    },
    "message": "hwregdsfdsf",
    "link": "http://example.com/wordpress/",
    "name": "example.com",
    "caption": "example.com",
    "icon": "https://www.facebook.com/images/icons/post.gif",
    "actions": [
      {
        "name": "Comment",
        "link": "https://www.facebook.com/12345/posts/67890"
      },
      {
        "name": "Like",
        "link": "https://www.facebook.com/12345/posts/67890"
      },
      {
        "name": "Share",
        "link": "https://www.facebook.com/12345/posts/67890"
      }
    ],
    "privacy": {
      "value": "EVERYONE",
      "description": "Public",
      "friends": "",
      "allow": "",
      "deny": ""
    },
    "type": "link",
    "status_type": "shared_story",
    "application": {
      "category": "Business",
      "link": "http://example.com/wordpress/",
      "name": "him_test_app",
      "id": "562********27561"
    },
    "created_time": "2015-07-09T14:17:56+0000",
    "updated_time": "2015-07-09T14:17:56+0000",
    "is_hidden": false,
    "subscribed": true,
    "is_expired": false
  }

      

But now it only provides

     "message": "hwregdsfdsf",
     "created_time": "2015-07-09T14:17:56+0000",
     "id": "12345_67890"
  }

      

Ok, it was implemented

Its implementation in various beautiful Joomla Webkul modules looks great, take a look here

+3


source to share


1 answer


You can manually specify the fields you want to return from the Grpah API.

Cm



for example

https://graph.facebook.com/{user-id}/feed?limit=1&locale=en_GB&access_token={access-token}&fields=id,from,message,link,caption,icons,actions,privacy,status_type

      

+10


source







All Articles