I know that it's a common question, but I have a different problem.
When I retrieve a Json response from PHP, it throws this alert warning and don't load the data into the datatable.
When I load the generated Json (retrieved from PHP) directly from file, the datatable loads the data correctly.
I have the following jquery configuration for my datatable:
$( document ).ready(function() {
$('#example').dataTable({
"language": {
"url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/Spanish.json"
},
"bProcessing": true,
"sAjaxSource": "response.php",
"aoColumns": [
{ mData: 'id' } ,
{ mData: 'name' },
{ mData: 'description' }
//{ mData: 'img', render: getImg },
]
});
});
The generated json from php (that works if loaded directly from file):
{
"sEcho": 1,
"iTotalRecords": 10,
"iTotalDisplayRecords": 10,
"aaData": [{
"id": "1",
"name": "Salsa estilo Casino",
"description": "Descri\u00e7\u00e3o ..."
}, {
"id": "2",
"name": "Salsa estilo Son",
"description": "Descri\u00e7\u00e3o ..."
}, {
"id": "3",
"name": "Salsa LA",
"description": "Descri\u00e7\u00e3o ..."
}, {
"id": "4",
"name": "Salsa NY",
"description": "Descri\u00e7\u00e3o ..."
}, {
"id": "5",
"name": "Bachata",
"description": "Descri\u00e7\u00e3o ..."
}, {
"id": "6",
"name": "Reggaeton",
"description": "Descri\u00e7\u00e3o ..."
}, {
"id": "7",
"name": "Chachacha",
"description": "Descri\u00e7\u00e3o ..."
}, {
"id": "8",
"name": "Rumba",
"description": "Descri\u00e7\u00e3o ..."
}, {
"id": "9",
"name": "Pachanga",
"description": "Descri\u00e7\u00e3o ..."
}, {
"id": "10",
"name": "Ritmos tradicionais cubanos",
"description": "Descri\u00e7\u00e3o ..."
}]
}
My PHP response.php file:
<?php
// my database classe with CRUDed POJOs.
include_once '../admin/db.php';
// That was from a sample code that worked fine.
$data = array(
array('Name'=>'Descrição ...', 'Empid'=>11, 'Salary'=>101, 'img' => '../img/lais.jpg'),
array('Name'=>'alam', 'Empid'=>1, 'Salary'=>102, 'img' => '../img/lais.jpg'),
array('Name'=>'phpflow', 'Empid'=>21, 'Salary'=>103, 'img' => '../img/lais.jpg')
);
/* Query the database and retrive in $data2[0] the total number of rows
and $data2[1] an array of arrays with the following format (as described above):
array(
array('id' => '1', 'name' => 'name', 'description' => 'Desc ...'),
...
)
*/
$data2 = Turma::fetchAllAssoc();
$results = array(
"sEcho" => 1,
"iTotalRecords" => 10,
"iTotalDisplayRecords" => 10,
"aaData"=>$data2[1]);
header('Content-Type: application/json');
echo json_encode($results);
?>
What am I doing wrong? It seems a bug form me.
Solved my problem.
In PHP, the response.php was returning only the json content that was shwon in the browser.
The error was: there was some html commented content that seems hidden in `include_once '../admin/db.php';, even the commented html tags.
When I added the line header('Content-Type: application/json'); everything that seems missing was shown in the browser.
Erased everything, even commented html tags to output (echo) only json_encode($results);. Then, everything worked smoothy.
Related
I am trying to add a customer(Podio item) to my Podio app. This customer is being added programmatically from within a php application. There are several fields present on the customer: Name, Address, Email, Title, Phone Number, and an array of Tags. When a tag is added the color changes to highlight it.
In previous iterations I have been successful adding a different tag(newsletter_subscribed) using the ID of the tag value that I want highlighted. Now when I try to add another tag(hospital, clinic, or urgent_care) it is throwing a PodioBadRequestError. The error cited is that the ID being used is and invalid type(integer).
I got the values of the tag ID's by looking at the JSON returned when an existing customer created manually within my Podio customer application. When I look at the ID fields in the JSON they are most definitely integers, I have tried strings as well. Everything I try throws the 400 Bad Request on the ID that I am trying to add.
I cannot for the life of me figure out why it is throwing the error when I add the tag ID's.
Below is the way that the application is put together:
This is the code that builds and sends the request:
public function addToPodio()
{
$address = $this->Address . ", " .
$this->Address2 . ", " .
$this->City . ", " .
$this->State . " " .
$this->Zip;
$item = [
'fields' => [
'name' => $this->PrimaryContactFirstName,
'last-name' => $this->PrimaryContactLastName,
'email-address' => ['type' => 'work', 'value' => $this->PrimaryContactEmail],
'phone-number' => ['type' => 'work', 'value' => $this->PrimaryContactPhone],
'address' => $address,
'organization' => [$this->CompanyName],
'tags-2' => []
],
];
if ($this->Newsletter && defined('PODIO_NEWSLETTER_TAG_ID')){
$item['fields']['tags-2'][] = PODIO_NEWSLETTER_TAG_ID;
}
if($this->OrganizationType && defined('PODIO_ORGANIZATION_TYPE_ID')){
if($this->OrganizationType == "Clinic"){
$item['fields']['tags-2'][] = PODIO_ORGANIZATION_TYPE_CLINIC_TAG_ID;
}
else if($this->OrganizationType == "Hospital"){
$item['fields']['tags-2'][] = PODIO_ORGANIZATION_TYPE_HOSPITAL_TAG_ID;
}
try {
//This is where the request is being made
$customer = PodioItem::create(PODIO_CUSTOMER_APP_ID, $item);
$this->PodioId = $customer->item_id;
$this->write();
} catch (Exception $e) {
error_log('We encountered an error adding your item to Podio' . $e);
return 'An error occurred while updating Podio. Please try again. If the error...';
}
This is the PHP $item that is being passed to the request that gets sent to the Podio API:
Array
(
[fields] => Array
(
[name] => Joe
[last-name] => Test
[phone-number] => Array
(
[type] => work
[value] => 8675309
)
[address] => 123 Main Road, , East Test, NY 12345
[organization] => Array
(
[0] => Another Test
)
[tags-2] => Array
(
[0] => 16
[1] => 96
)
)
)
This is the config file with the all of the constants, secrets tokens and ID's needed to connect to the Podio API, authenticate and all of that stuff. Obfuscated Example below:
define('PODIO_CUSTOMER_APP_ID', 'xxxxx-obfuscated-xxxxx');
define('PODIO_CUSTOMER_APP_TOKEN', 'xxxxx-obfuscated-xxxxx');
define('PODIO_CLIENT_SECRET', 'xxxxx-obfuscated-xxxxx');
define('PODIO_CLIENT_ID', 'xxxxx-obfuscated-xxxxx');
define('PODIO_ORGANIZATION_TYPE_ID', 'xxxxx-obfuscated-xxxx');
define('PODIO_NEWSLETTER_TAG_ID', 'xxxxx-obfuscated-xxxxx');
define('PODIO_ORGANIZATION_TYPE_CLINIC_TAG_ID', 'xxxxx-obfuscated-xxxxx');
Podio::setup(PODIO_CLIENT_ID, PODIO_CLIENT_SECRET, [
'session_manager' => Injector::inst()->get(PodioSession::class),
'curl_options' => array(),
]);
Below is the JSON that I used to get the values of the ID's. I got this from a postman request to the API. The basic form of the request without all of the authentication present looked like:
podio.com/MY_PODIO_ACCOUNT_NAME/app/APPLICATION_ID/item/ITEM_ID
Please note: I removed many of the main fields like Address and Organization for brevity's sake, so it won't match completely the PHP request object above.
{
"id": 0000,
"item_id": 00000,
"revision": 0,
"app": null,
"app_item_id": 00000,
"app_item_id_formatted": "PODIO_Field_ID:00000",
"external_id": null,
"title": "TEST ITEM",
"fields": [
{
"id": 0000,
"field_id": 0000,
"type": "text",
"external_id": "name",
"label": "First Name",
"values": [
{
"value": "Joe"
}
],
"config": {
"settings": {
"format": "plain",
"size": "small"
},
"mapping": "contact_name",
"label": "First Name"
},
"humanized_value": "Joe"
},
{
"id": 0000,
"field_id": 0000,
"type": "text",
"external_id": "last-name",
"label": "Last Name",
"values": [
{
"value": "<p>Test<br /></p>"
}
],
"config": {
"settings": {
"format": "html",
"size": "large"
},
"mapping": null,
"label": "Last Name"
},
"humanized_value": "Test"
},
{
"id": 0000,
"field_id": 0000,
"type": "phone",
"external_id": "phone-number",
"label": "Phone Number",
"values": [
{
"type": "work",
"value": "867-5309"
}
],
"config": {
"settings": {
"call_link_scheme": "callto",
"possible_types": [
"mobile",
"work",
"home",
"main",
"work_fax",
"private_fax",
"other"
]
},
"mapping": "contact_phone",
"label": "Phone Number"
},
"humanized_value": "8675309"
},
{
"id": 11111,
"field_id": 11111,
"type": "category",
"external_id": "tags-2",
"label": "Tags",
"values": [
{
"value": {
"status": "active",
"text": "Clinic",
"id": 16,
"color": "DCEBD8"
}
},
{
"value": {
"status": "active",
"text": "Newlsetter_subscribed",
"id": 96,
"color": "DCEBD8"
}
}
],
"config": {
"settings": {
"multiple": true,
"options": [
{
"status": "active",
"text": "Mktng:test1/2020",
"id": 150,
"color": "DCEBD8"
},
{
"status": "active",
"text": "Mktng:Test2/2020",
"id": 3,
"color": "DCEBD8"
},
{
"status": "active",
"text": "SampleTest",
"id": 48,
"color": "DCEBD8"
},
{
"status": "deleted",
"text": "Test Center",
"id": 139,
"color": "DCEBD8"
},
{
"status": "deleted",
"text": "Sample Center",
"id": 99,
"color": "DCEBD8"
},
{
"status": "deleted",
"text": "Testing Center",
"id": 140,
"color": "DCEBD8"
}
],
"display": "inline"
},
"mapping": null,
"label": "Tags"
},
"humanized_value": "Clinic; Newsletter;"
}
this JSON continues for pages and pages, I only included the relevant fields for my question.
It looks like the error is being thrown because of the organization value, not the tags value.
For a category field, an array of integer indices is correct.
[tags-2] => [ 16, 96 ]
For an app field, you need to provide an array of integer item ID's.
[organization] => [ 12345 ]
But your code above is sending an array of strings:
[organization] => [ "Another Test" ]
That won't work.
This question already has an answer here:
How to extract and access data from JSON with PHP?
(1 answer)
Closed 4 years ago.
I'm new into PHP and JSON and I have a problem, I want to retrieve a item and value from a JSON:
{
"status": true,
"webhook_type": 100,
"data": {
"product": {
"id": "lSEADIQ",
"attachment_id": null,
"title": "Registration",
"description": null,
"image": null,
"unlisted": false,
"type": "service",
"price": 1,
"currency": "EUR",
"email": {
"enabled": false
},
"stock_warning": 0,
"quantity": {
"min": 1,
"max": 1
},
"confirmations": 1,
"custom_fields": [
{
"name": "Forum username",
"type": "text",
"required": true
}
],
"gateways": [
"Bitcoin"
],
"webhook_urls": [],
"dynamic_url": "",
"position": null,
"created_at": "2018-10-01 12:51:12",
"updated_at": "2018-10-01 12:55:46",
"stock": 9223372036854776000,
"accounts": []
},
"order": {
"id": "8e23b496-121a-4dc6-8ec4-c45835680db2",
"created_at": "Tue, 02 Oct 2018 00:54:56 +0200",
"paid_at": null,
"transaction_id": null,
"confirmations": 1,
"required_confirmations": 3,
"received_amount": 0,
"crypto_address": "1NeNQws7JLbTr6bjekfeaXSV7XiyRsv7V8",
"crypto_amount": "0.4815",
"quantity": 1,
"price": 19.99,
"currency": "EUR",
"exchange_rate": "1.21",
"gateway": "BTC",
"email": "webhook#site.gg",
"ip_address": "123.456.789.111",
"agent": {
"geo": {
"ip": "214.44.18.6",
"iso_code": "US",
"country": "United States"
},
"data": {
"is_mobile": false,
"is_table": false,
"is_desktop": true,
"browser": {
"name": "Chrome",
"version": "63.0.3239.132"
}
}
},
"custom_fields": [
{
"name": "user_id",
"value": 184191
}
],
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3)"
}
}
}
I want to retrieve items from data -> order, for example "id" or "ip_address".
Thank you for read this, I hope someone can help me in this, because I'm lost, I started to code very recently and I'm trying to learn a lot.
Regards!
Where test.json is the json you uploaded, place it in a file named test.json and ensure its placed in the same directory.
<?php
$load = file_get_contents("test.json") or die("JSON load failed");
$json_a = json_decode($load, true);
print $json_a['data']['order']['ip_address'] . "\n";
?>
Gives:
123.456.789.111
My answer reads the JSON from a file as were it dumped directly in your code, which indeed it could be, it would make the code less readable and your file more messy.
If you dont want to place the file in the same directory, simply specify the full file path. E.g. file_get_contents("this/dir/here/test.json");
You can read about how json_decode works here, its essential we pass it the true parameter to make our arrays associative.
You can extract your need array from JSON data. You can use a loop too to read all your data inside the order array.
$array = json_decode($json, true);
$verbose = $array['data'];
$orderArray = $verbose['order'];
print_r($orderArray);
echo $orderArray['id'];
echo $orderArray['ip_address'];
I've gone through a few examples and documentations and kind find a solution update a nested object in the this result set.
I can add one (if one does not exist)
I can append to it (if one does exist)
Can't figure out how to delete a selected entry.
Is there a method I can use (using the php client) to add an entry if it does not exist / update an entry if it does exist / delete the second entry.
I'm inheriting this problem and am new to Elastic search.
Thanks.
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 1,
"hits": [
{
"_index": "products",
"_type": "categories",
"_id": "AUpRjtKZfXI7LIe9OpNx",
"_score": 1,
"_source": {
"name": "Primary",
"description": "Primary Category",
"slug": "Primary",
"created": "2014-12-16 00:25:22",
"parent": [
{
"name": "First One",
"description": "Test",
"id": "ae74ea4e2e865ed3fd60c18a06e69c65",
"slug": "first-one"
},
{
"name": "Second One",
"description": "Testing Again",
"id": "c8dbe5143c8dfd6957fa33e6cea7a0a8",
"slug": "second-one"
}
]
}
}
]
}
}
Do you want to do all three in the same operation?
Deleting the second nested object is achieved through a script which removes the second element:
PUT /products
{
"mappings": {
"categories": {
"properties": {
"parent": {
"type": "nested",
"properties": {
"name": { "type": "string" },
"description": { "type": "string" },
"id": { "type": "string", "index": "not_analyzed" },
"slug": { "type": "string" }
}
}
}
}
}
}
PUT /products/categories/1
{
"name": "Primary",
"description": "Primary Category",
"slug": "Primary",
"created": "2014-12-16 00:25:22",
"parent": [
{
"name": "First One",
"description": "Test",
"id": "ae74ea4e2e865ed3fd60c18a06e69c65",
"slug": "first-one"
},
{
"name": "Second One",
"description": "Testing Again",
"id": "c8dbe5143c8dfd6957fa33e6cea7a0a8",
"slug": "second-one"
}
]
}
POST /products/categories/1/_update
{
"script" : "ctx._source.parent.remove(1)",
"lang": "groovy"
}
GET /products/categories/1
So in PHP code (using the official PHP client), the update would look like:
$params = [
'index' => 'products',
'type' => 'categories',
'id' => 1,
'body' => [
'script' => 'ctx._source.parent.remove(1)',
'lang' => 'groovy'
]
];
$result = $client->update($params);
I've got a request to present the data in the following format as a JSON feed:
{
"id": "123",
"info": {
"code": "ZGE",
"description": "test1",
"type": "AVL",
"date": "09/08/2012"
}
},
{
"id": "456",
"info": {
"code": "ZDN",
"description": "test2",
"type": "CLR",
"date": "16/02/2012"
}
}
However in my PHP code, I think I need to have a key itterator - but I end up with this format:
{
"0": {
"id": "123",
"info": {
"code": "ZGE",
"description": "test1",
"type": "AVL",
"date": "09/08/2012"
}
},
"1": {
"id": "456",
"info": {
"code": "ZDN",
"description": "test2",
"type": "CLR",
"date": "16/02/2012"
}
}
}
Any ideas on how to build the first data set with out having the index iterator?
simple create an array of objects, no need for the key (notice the [ ] surrounding your list)
json.txt
[{
"id": "123",
"info": {
"code": "ZGE",
"description": "test1",
"type": "AVL",
"date": "09/08/2012"
}
},
{
"id": "456",
"info": {
"code": "ZDN",
"description": "test2",
"type": "CLR",
"date": "16/02/2012"
}
}]
example.php
<?php
$data = json_decode(file_get_contents('./json.txt'));
?>
It can be built like this:
$arr = array(
array(
'id' => 123,
'info' => array(
'code' => 'ZGE',
'description' => 'test1',
'type' => 'AVL'
)
),
array(
'id' => 456,
'info' => array(
'code' => 'ZDN',
'description' => 'test2',
'type' => 'CLR'
)
)
);
echo json_encode($arr);
Outputs
[
{
"id": 123,
"info": {
"code": "ZGE",
"description": "test1",
"type": "AVL"
}
},
{
"id": 456,
"info": {
"code": "ZDN",
"description": "test2",
"type": "CLR"
}
}
]
the JSON format you've specified in the first example (ie the requested format) is not valid JSON.
A valid JSON string must evaluate to a single Javascript object; the example you've given evaluates to two Javascript objects, separated by a comma. In order to make it valid, you would need to either enclose the whole thing in square brackets, to turn it into a JS array or enclose it in curly braces, and give each of the two objects a key.
The PHP code you've written is doing the second of these two options. It is therefore generating valid JSON code, about as close to the original request as could be expected while still being valid.
It would help if you'd shown us the PHP code that you've used to do this; without that, I can't really give you advice on how to improve it, but if you want to switch to the square bracket notation, all you need is to put your PHP objects into an unkeyed array, and json_encode() should do it all for you; you shouldn't need to use a keyed array or an iterator for that.
The only reason json_encode should produce the output you're seeing is adding another named key to the array that you're passing to json_encode, by default it should work as you want:
$json = '[
{
"id": "123",
"recall_info": {
"code":"ZGE",
"description": "test1",
"type": "AVL",
"date": "09/08/2012"
}
},
{
"id": "123",
"recall_info": {
"code": "ZDN",
"description": "test2",
"type": "CLR",
"date": "16/02/2012"
}
}
]';
$php = array(
(object) array(
'id' => '123',
'recall_info' => (object) array(
'code' => 'ZGE',
'description' => 'test1',
'type' => 'AVL',
'date' => '09/08/2012'
)
),
(object) array(
'id' => '123',
'recall_info' => (object) array(
'code' => 'ZGE',
'description' => 'test2',
'type' => 'CLR',
'date' => '16/02/2012'
)
)
);
var_dump(json_encode($php));
This app is posting to the user's timeline, using PHP and Facebook's PHP API implementation. This is working right now, for over several weeks already.
The following PHP code is being used to post a message:
if($hasPhoto === TRUE)
{
// Post to FB with picture
$facebook->setFileUploadSupport(true);
$result = $facebook->api("/me/photos", "post", array(
'message' => $message,
'place' => $place,
'source' => '#' . $photo
));
}
else
{
// Post to FB without picture
$result = $facebook->api("/me/feed", "post", array(
'message' => $message,
'place' => $place
));
}
This is working properly, except there are two formattings of the $result:
array ('id' => '103240856515XXX', )
array ('id' => '100004900175XXX_103239809849XXX', )
The Graph API documentation tells us the following:
A post from Facebook Platform: https://graph.facebook.com/19292868552_10150189643478553
A status message on the Facebook Page: https://graph.facebook.com/10150224661566729
This means the used PHP code generates posts ór status messages. I don´t see any relation between the textmessages, photos, dates, or authors. It seems to happen randomly.
The following shows the relationship from our data between the format of the id and whether a photo is attached.
select count(*) from fbposts where facebookpostid like '%\_%' and hasphoto = 1; -- 90
select count(*) from fbposts where facebookpostid like '%\_%' and hasphoto = 0; -- 87
select count(*) from fbposts where facebookpostid not like '%\_%' and hasphoto = 1; -- 47
select count(*) from fbposts where facebookpostid not like '%\_%' and hasphoto = 0; -- 54
Why does this behaviour happen? How to force a Post? The reason why this is relevant is because Post does have a Privacy property which I would like to query.
Update:
Querying a status message 545778052106XXX, given by the FB API, with a photo, gives me:
{
"id": "545778052106XXX",
"from": {
"name": "Jeffrey Krist",
"id": "100000226354XXX"
},
"name": "My message!",
"picture": "http://photos-f.ak.fbcdn.net/hphotos-ak-ash3/522827_545778052106XXX_1151562XXX_s.jpg",
"source": "http://sphotos-f.ak.fbcdn.net/hphotos-ak-ash3/s720x720/522827_545778052106XXX_1151562XXX_n.jpg",
"height": 720,
"width": 720,
"images": [
{
"height": 2048,
"width": 2048,
"source": "http://sphotos-f.ak.fbcdn.net/hphotos-ak-ash3/s2048x2048/522827_545778052106XXX_1151562XXX_n.jpg"
}, .. lots more
],
"link": "https://www.facebook.com/photo.php?fbid=545778052106402&set=p.545778052106XXX&type=1",
"icon": "http://static.ak.fbcdn.net/rsrc.php/v2/yz/r/StEh3RhPXXX.gif",
"place": {
"id": "182665821805XXX",
"name": "A company name",
"location": {
"street": "My street 13", ..
}
},
"created_time": "2012-11-01T08:35:20+0000",
"updated_time": "2012-11-01T08:35:20+0000",
"comments": ...
"likes": ...
}
Querying a post message using a id from the FB API gives me:
{
"id": "100003331805XXX_299609210160XXX",
"from": {
"name": "Some name",
"id": "100003331805XXX"
},
"message": "My message",
"picture": "http://photos-e.ak.fbcdn.net/hphotos-ak-ash3/560724_299609200160XXX_789651XXX_s.jpg",
"link": "https://www.facebook.com/photo.php?fbid=299609200160XXX&set=a.285494101571XXX.69331.100003331805XXX&type=1&relevant_count=1",
"name": "Photo album name",
"icon": "http://static.ak.fbcdn.net/rsrc.php/v2/yz/r/StEh3RhPXXX.gif",
"actions": [
{
"name": "Comment",
"link": "https://www.facebook.com/100003331805XXX/posts/299609210160XXX"
},
{
"name": "Like",
"link": "https://www.facebook.com/100003331805XXX/posts/299609210160XXX"
}
],
"privacy": {
"value": "ALL_FRIENDS", ...
},
"place": {
"id": "174171872642XXX", ...
},
"type": "photo",
"status_type": "added_photos",
"object_id": "299609200160XXX",
"application": {
"name": "My app", ...
},
"created_time": "2012-12-21T22:33:59+0000",
"updated_time": "2012-12-21T23:30:39+0000",
"likes": ...
"comments": ...
}
Querying a composed id, _ ('100000226354XXX_545778052106XXX'), which is message with a photo, gives me:
{
"error": {
"message": "Unsupported get request.",
"type": "GraphMethodException",
"code": 100
}
}
There is no need to force a post when each status message is a post object.
Status message object 10100948019328597
Post object userid_10100948019328597
Status message object
{
"id": "10100948019328597",
"from": {
"name": "phwd",
"id": "13608786"
},
"message": "Happy Thanksgiving you cool Canadians!",
"updated_time": "2012-10-08T23:17:27+0000",
"likes": {
"data": [
],
"paging": {
"next":
}
}
}
Post object
{
"id": "13608786_10100948019328597",
"from": {
"name": "phwd",
"id": "13608786"
},
"message": "Happy Thanksgiving you cool Canadians!",
"actions": [
{
"name": "Comment",
"link": "http://www.facebook.com/13608786/posts/10100948019328597"
},
{
"name": "Like",
"link": "http://www.facebook.com/13608786/posts/10100948019328597"
}
],
"privacy": {
"description": "Public",
"value": "EVERYONE",
"friends": "",
"networks": "",
"allow": "",
"deny": ""
},
"type": "status",
"status_type": "mobile_status_update",
"created_time": "2012-10-08T23:17:28+0000",
"updated_time": "2012-10-08T23:17:28+0000",
"likes": {
"data": [
]
},
"comments": {
"count": 0
}
}
The best way to check would be to compare /me/statuses vs /me/posts