My routes look like this:
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return this.store.find('deliverySchedule');
}
});
My API payload returns deliverySchedules like this (see below).
{
"delivery_schedules": [
{
"id": 47,
"from": "0001-01-01T09:00:00.000Z",
"to": "0001-01-01T10:00:00.000Z",
"period": "today",
"status": "available",
"created_at": "2015-01-12T16:17:05.663Z",
"updated_at": "2015-01-12T16:17:05.663Z"
},
{
"id": 62,
"from": "0001-01-01T09:00:00.000Z",
"to": "0001-01-01T10:00:00.000Z",
"period": "tomorrow",
"status": "available",
"created_at": "2015-01-12T16:17:05.684Z",
"updated_at": "2015-01-12T16:17:05.684Z"
},
{
"id": 48,
"from": "0001-01-01T10:00:00.000Z",
"to": "0001-01-01T11:00:00.000Z",
"period": "today",
"status": "available",
"created_at": "2015-01-12T16:17:05.665Z",
"updated_at": "2015-01-12T16:17:05.665Z"
},
{
"id": 63,
"from": "0001-01-01T10:00:00.000Z",
"to": "0001-01-01T11:00:00.000Z",
"period": "tomorrow",
"status": "available",
"created_at": "2015-01-12T16:17:05.685Z",
"updated_at": "2015-01-12T16:17:05.685Z"
},
{
"id": 49,
"from": "0001-01-01T11:00:00.000Z",
"to": "0001-01-01T12:00:00.000Z",
"period": "today",
"status": "available",
"created_at": "2015-01-12T16:17:05.666Z",
"updated_at": "2015-01-12T16:17:05.666Z"
},
{
"id": 64,
"from": "0001-01-01T11:00:00.000Z",
"to": "0001-01-01T12:00:00.000Z",
"period": "tomorrow",
"status": "available",
"created_at": "2015-01-12T16:17:05.686Z",
"updated_at": "2015-01-12T16:17:05.686Z"
},
{
"id": 50,
"from": "0001-01-01T12:00:00.000Z",
"to": "0001-01-01T13:00:00.000Z",
"period": "today",
"status": "available",
"created_at": "2015-01-12T16:17:05.668Z",
"updated_at": "2015-01-12T16:17:05.668Z"
},
{
"id": 65,
"from": "0001-01-01T12:00:00.000Z",
"to": "0001-01-01T13:00:00.000Z",
"period": "tomorrow",
"status": "available",
"created_at": "2015-01-12T16:17:05.687Z",
"updated_at": "2015-01-12T16:17:05.687Z"
},
{
"id": 66,
"from": "0001-01-01T13:00:00.000Z",
"to": "0001-01-01T14:00:00.000Z",
"period": "tomorrow",
"status": "available",
"created_at": "2015-01-12T16:17:05.688Z",
"updated_at": "2015-01-12T16:17:05.688Z"
},
{
"id": 51,
"from": "0001-01-01T13:00:00.000Z",
"to": "0001-01-01T14:00:00.000Z",
"period": "today",
"status": "available",
"created_at": "2015-01-12T16:17:05.669Z",
"updated_at": "2015-01-12T16:17:05.669Z"
},
{
"id": 67,
"from": "0001-01-01T14:00:00.000Z",
"to": "0001-01-01T15:00:00.000Z",
"period": "tomorrow",
"status": "available",
"created_at": "2015-01-12T16:17:05.689Z",
"updated_at": "2015-01-12T16:17:05.689Z"
},
{
"id": 52,
"from": "0001-01-01T14:00:00.000Z",
"to": "0001-01-01T15:00:00.000Z",
"period": "today",
"status": "available",
"created_at": "2015-01-12T16:17:05.670Z",
"updated_at": "2015-01-12T16:17:05.670Z"
},
{
"id": 53,
"from": "0001-01-01T15:00:00.000Z",
"to": "0001-01-01T16:00:00.000Z",
"period": "today",
"status": "available",
"created_at": "2015-01-12T16:17:05.672Z",
"updated_at": "2015-01-12T16:17:05.672Z"
}
]
}
I have a template that looks like this:
<ul>
{{#each deliverySchedule in model}}
<li>
{{deliverySchedule.from}} - {{deliverySchedule.from}} ({{deliverySchedule.status}})
</li>
{{/each}}
</ul>
I want deliverySchedule.from and deliverySchedule.to to display something like: 1pm - 2pm (available). Right now it is displaying as:
Tue Jan 01 1901 17:00:00 GMT+0800 (SGT) - Tue Jan 01 1901 17:00:00 GMT+0800 (SGT) available
What is the right way to go about this? Should I turn the results of delivery_schedules into a new array in a controller and use something like moment.js to convert the from and to values to 1pm and 2pm formats respectively?
Apparently, I need to register the custom helper, following http://www.ember-cli.com/#resolving-handlebars-helpers
// app/helpers/convert-date-time.js
import Ember from "ember";
export default Ember.Handlebars.makeBoundHelper(function(value, options) {
var date = new Date(value);
var hours = date.getHours();
var minutes = date.getMinutes();
var ampm = hours >= 12 ? 'pm' : 'am';
hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12'
minutes = minutes < 10 ? '0'+minutes : minutes;
var strTime = hours + ':' + minutes + ' ' + ampm;
return strTime;
});
In a template:
{{convert-date-time deliverySchedule.from}}
You should use handelbar helpers in order to format your dates :)
Here is the documentation about it :
http://emberjs.com/guides/templates/writing-helpers/
You can use moment.js in your helper however depending on your needs it's may be over killing :)
In ember-cli use the command ember generate helper yourhelpername it will create a file in
app/helpers/ which looks like the following :
import Ember from 'ember';
function myhelper(value) {
//in your case format the date here ...for example ....
//you can also use moment.js and so on...
var toReturn=(new Date(value).getHours())+1;
if(toReturn >11){
toReturn=toReturn + " pm";
}else{
toReturn=toReturn + " am";
}
return toReturn;
}
export { myhelper };
export default Ember.Handlebars.makeBoundHelper(myhelper);
You then use {{myhelper deliverySchedule.from}}
you can also extend the helper by adding second parameters for options
import Ember from 'ember';
function myhelper(value,format) {
//in your case format the date here ...for example ....
//you can also use moment.js and so on...
var myDate=new Date(value);
var toReturn="";
switch(format){
case "dmy" :
toReturn=myDate.getDate()+" "+(myDate.getMonth()+1)+" "+myDate.getFullYear();
break;
case "ymd" :
toReturn=myDate.getFullYear()+" "+(myDate.getMonth()+1)+" "+myDate.getDate();
break;
default :
toReturn=(myDate.getMonth()+1)+" "+myDate.getDate();
break;
}
return toReturn;
}
export { myhelper };
export default Ember.Handlebars.makeBoundHelper(myhelper);
and in your template use
{{myhelper deliverySchedule.from "dmy"}}
Related
I am trying to access the pagination variables in the response such as page_number, total_pages inside my controller as I have introduced this feature just now to this legacy code in the backend and now I am stuck how can I read those data and go further.
My serializer code
import DS from 'ember-data';
var underscore = Ember.String.underscore;
export default DS.RESTSerializer.extend(DS.EmbeddedRecordsMixin, {
attrs: {
rules: {
embedded: 'always'
},
test_cases: {
serialize: "id",
deserialize: 'records'
},
},
keyForRelationship: function (rawKey) {
return underscore(rawKey) + "_id";
}
})
route.js
import Route from '#ember/routing/route';
import { hash } from 'rsvp'
import ResetScrollMixin from 'admin-frontend/mixins/reset-scroll-mixin'
export default Route.extend(ResetScrollMixin, {
model(params) {
return hash({
ruleSetVersions: this.store.query('rule-set-version', {
rule_set_id: params.rule_set_id,
is_archived: false,
page: '1'
}),
ruleSet: this.store.findRecord('rule-set', params.rule_set_id)
})
}
});
And response json looks like
{
"page_number": 1,
"page_size": 5,
"rule_set_versions": [{
"id": 930,
"last_updated_by": 1,
"created_by": 1,
"default_rule_id": 963,
"is_live": true,
"is_archived": false,
"start_time": "2020-12-30T18:30:00Z",
"rule_set_id": 11,
"rules": [{
"id": 963,
"priority": 10000001,
"conditions": [],
"results": [{
"id": 59,
"operator": null,
"value": "00",
"rule_id": 963,
"rule_set_metadatum": {
"created_at": "2020-11-18T10:01:38Z",
"datatype": "integer",
"id": 34,
"name": "edd_result",
"property_category": "result",
"updated_at": "2020-11-18T10:01:38Z",
"validations": {
"max": 99999,
"min": 0
}
},
"created_at": "2020-11-18T10:10:41Z",
"updated_at": "2020-11-18T10:10:41Z"
}],
"created_at": "2020-11-18T10:10:32Z",
"updated_at": "2020-11-18T10:10:32Z"
}, {
"id": 971,
"priority": 1,
"conditions": [{
"id": 57,
"comparator": "equal_to",
"value": "100",
"rule_id": 971,
"rule_set_metadatum": {
"created_at": "2020-11-18T10:01:05Z",
"datatype": "text",
"id": 33,
"name": "edd_con",
"property_category": "condition",
"updated_at": "2020-11-18T10:01:05Z",
"validations": {}
},
"created_at": "2020-12-23T09:05:04Z",
"updated_at": "2020-12-23T09:05:04Z"
}],
"results": [{
"id": 66,
"operator": null,
"value": "100",
"rule_id": 971,
"rule_set_metadatum": {
"created_at": "2020-11-18T10:01:38Z",
"datatype": "integer",
"id": 34,
"name": "edd_result",
"property_category": "result",
"updated_at": "2020-11-18T10:01:38Z",
"validations": {
"max": 99999,
"min": 0
}
},
"created_at": "2020-12-23T09:05:10Z",
"updated_at": "2020-12-23T09:05:10Z"
}],
"created_at": "2020-12-23T09:04:54Z",
"updated_at": "2020-12-23T09:04:54Z"
}],
"created_at": "2020-11-18T10:10:32Z",
"updated_at": "2020-12-23T09:06:04Z"
}, {
"id": 932,
"last_updated_by": 1,
"created_by": 1,
"default_rule_id": 969,
"is_live": true,
"is_archived": false,
"start_time": "2020-11-25T18:30:00Z",
"rule_set_id": 11,
"rules": [{
"id": 969,
"priority": 10000001,
"conditions": [],
"results": [{
"id": 64,
"operator": null,
"value": "1000",
"rule_id": 969,
"rule_set_metadatum": {
"created_at": "2020-11-18T10:01:38Z",
"datatype": "integer",
"id": 34,
"name": "edd_result",
"property_category": "result",
"updated_at": "2020-11-18T10:01:38Z",
"validations": {
"max": 99999,
"min": 0
}
},
"created_at": "2020-11-25T11:53:58Z",
"updated_at": "2020-11-25T11:53:58Z"
}],
"created_at": "2020-11-25T11:53:49Z",
"updated_at": "2020-11-25T11:53:49Z"
}, {
"id": 970,
"priority": 1,
"conditions": [{
"id": 56,
"comparator": "equal_to",
"value": "100",
"rule_id": 970,
"rule_set_metadatum": {
"created_at": "2020-11-18T10:01:05Z",
"datatype": "text",
"id": 33,
"name": "edd_con",
"property_category": "condition",
"updated_at": "2020-11-18T10:01:05Z",
"validations": {}
},
"created_at": "2020-11-25T11:54:11Z",
"updated_at": "2020-11-25T11:54:11Z"
}],
"results": [{
"id": 65,
"operator": null,
"value": "100",
"rule_id": 970,
"rule_set_metadatum": {
"created_at": "2020-11-18T10:01:38Z",
"datatype": "integer",
"id": 34,
"name": "edd_result",
"property_category": "result",
"updated_at": "2020-11-18T10:01:38Z",
"validations": {
"max": 99999,
"min": 0
}
},
"created_at": "2020-11-25T11:54:16Z",
"updated_at": "2020-11-25T11:54:16Z"
}],
"created_at": "2020-11-25T11:54:03Z",
"updated_at": "2020-11-25T11:54:03Z"
}],
"created_at": "2020-11-25T11:53:49Z",
"updated_at": "2020-11-25T11:55:12Z"
}, {
"id": 934,
"last_updated_by": 1,
"created_by": 1,
"default_rule_id": 974,
"is_live": false,
"is_archived": false,
"start_time": "2020-12-30T18:30:00Z",
"rule_set_id": 11,
"rules": [{
"id": 974,
"priority": 10000001,
"conditions": [],
"results": [{
"id": 69,
"operator": null,
"value": "00",
"rule_id": 974,
"rule_set_metadatum": {
"created_at": "2020-11-18T10:01:38Z",
"datatype": "integer",
"id": 34,
"name": "edd_result",
"property_category": "result",
"updated_at": "2020-11-18T10:01:38Z",
"validations": {
"max": 99999,
"min": 0
}
},
"created_at": "2021-03-11T10:55:44Z",
"updated_at": "2021-03-11T10:55:44Z"
}],
"created_at": "2021-03-11T10:55:44Z",
"updated_at": "2021-03-11T10:55:44Z"
}, {
"id": 976,
"priority": 1,
"conditions": [{
"id": 60,
"comparator": "equal_to",
"value": "100",
"rule_id": 976,
"rule_set_metadatum": {
"created_at": "2020-11-18T10:01:05Z",
"datatype": "text",
"id": 33,
"name": "edd_con",
"property_category": "condition",
"updated_at": "2020-11-18T10:01:05Z",
"validations": {}
},
"created_at": "2021-03-12T16:18:04Z",
"updated_at": "2021-03-12T16:18:04Z"
}],
"results": [{
"id": 71,
"operator": null,
"value": "100",
"rule_id": 976,
"rule_set_metadatum": {
"created_at": "2020-11-18T10:01:38Z",
"datatype": "integer",
"id": 34,
"name": "edd_result",
"property_category": "result",
"updated_at": "2020-11-18T10:01:38Z",
"validations": {
"max": 99999,
"min": 0
}
},
"created_at": "2021-03-12T16:18:10Z",
"updated_at": "2021-03-12T16:18:10Z"
}],
"created_at": "2021-03-12T16:17:55Z",
"updated_at": "2021-03-12T16:17:55Z"
}],
"created_at": "2021-03-11T10:55:44Z",
"updated_at": "2021-03-11T10:55:44Z"
}],
"total_entries": 3,
"total_pages": 1
}
I am able to read and parse all the data inside the rule_set_versions array but I am unable to access the pagination params that are out side it.
Ember noob here.
I've got a dataset that looks like so;
[
"transactions": [
{
"month": "Dec",
"data": [
{
"id": "333a32c6-eaf0-3f11-8a2b-963282fb700c",
"amount": "776",
"created_at": "2019-12-04 10:57:50",
"updated_at": "2019-12-04 10:57:50"
},
{
"id": "36688452-92f2-3ae7-911a-9543fe29cae6",
"amount": "1798",
"created_at": "2019-12-04 10:57:50",
"updated_at": "2019-12-04 10:57:50"
},
{
"id": "67856ceb-1eb5-369b-b3c1-7bd92c037c70",
"amount": "9507",
"created_at": "2019-12-04 10:57:50",
"updated_at": "2019-12-04 10:57:50"
},
{
"id": "7e9465be-0151-3828-b429-2b7c4db2aa5e",
"amount": "944",
"created_at": "2019-12-04 10:57:50",
"updated_at": "2019-12-04 10:57:50"
},
{
"id": "dd5019b5-690b-33e0-a633-de6162cd687a",
"amount": "5327",
"created_at": "2019-12-04 10:57:50",
"updated_at": "2019-12-04 10:57:50"
},
{
"id": "eb5f1473-e871-357d-be3c-af2dc00ff22d",
"amount": "4638",
"created_at": "2019-12-04 10:57:50",
"updated_at": "2019-12-04 10:57:50"
}
]
},
{
"month": "Mar",
"data": [
{
"id": "5929f7ad-7ad5-35dc-9935-c06bc0283f20",
"amount": "5251",
"created_at": "2019-03-04 10:57:50",
"updated_at": "2019-12-04 10:57:50"
}
]
},
{
"month": "Nov",
"data": [
{
"id": "8c36b5dd-2b15-3024-83f4-551df33d9fcc",
"amount": "3643",
"created_at": "2019-11-04 10:57:50",
"updated_at": "2019-12-04 10:57:50"
},
{
"id": "abcd4af5-7a7e-3a9b-8c02-f251f6724062",
"amount": "2622",
"created_at": "2019-11-04 10:57:50",
"updated_at": "2019-12-04 10:57:50"
}
]
},
{
"month": "Oct",
"data": [
{
"id": "925b5efb-7933-396e-96ab-9473a93009ff",
"amount": "8674",
"created_at": "2019-10-04 10:57:50",
"updated_at": "2019-12-04 10:57:50"
}
]
}
]
]
Basically I want to show a chart with all the months of the year, and if they aren't present in the transactions array, it returns just 0 for that month on the chart.
How would I go about parsing this object and making sure it all matches up with my labels on my chart? All examples in the documentation use really basic integer's as the dataset and there are no examples I could find of using an object!
I have a table for some activities like
[
{
"id": 123,
"name": "Ram",
"status": 1,
"activity": "Poster Design"
},
{
"id": 123,
"name": "Ram",
"status": 1,
"activity": "Poster Design"
},
{
"id": 124,
"name": "Leo",
"categories": [
"A",
"B",
"C"
],
"status": 1,
"activity": "Brochure"
},
{
"id": 134,
"name": "Levin",
"categories": [
"A",
"B",
"C"
],
"status": 1,
"activity": "3D Printing"
}
]
I want to get this data from elastic search 5.5 by sorting on field activity, but I need all the data corresponding to name = "Ram" first and then remaining in a single query.
You can use function score query to boost the result based on match for the filter(this case ram in name).
Following query should work for you
POST sort_index/_search
{
"query": {
"function_score": {
"query": {
"match_all": {}
},
"boost": "5",
"functions": [{
"filter": {
"match": {
"name": "ram"
}
},
"random_score": {},
"weight": 1000
}],
"score_mode": "max"
}
},
"sort": [{
"activity.keyword": {
"order": "desc"
}
}]
}
I would suggest using a bool query combined with the should clause.
U will also need to use the sort clause on your field.
I am new to CouchDB. I have a 9 gb dataset loaded into my couchdb. I am able to map everything correctly. But I cannot reduce any of the results using the code written in the reduce column. When i tried log, log shows that rereduce values as false. Do i need to do anything special while doing the Map() or how to set the rereduce value is TRUE??
A sample of my data is as follows:
{
"_id": "33d4d945613344f13a3ee92933b160bf",
"_rev": "1-0425ca93e3aa939dff46dd51c3ab86f2",
"release": {
"genres": {
"genre": "Electronic"
},
"status": "Accepted",
"videos": {
"video": [
{
"title": "[1995] bola - krak jakomo",
"duration": 349,
"description": "[1995] bola - krak jakomo",
"src": "http://www.youtube.com/watch?v=KrELXoYThpI",
"embed": true
},
{
"title": "Bola - Forcasa 3",
"duration": 325,
"description": "Bola - Forcasa 3",
"src": "http://www.youtube.com/watch?v=Lz9itUo5xtc",
"embed": true
},
{
"title": "Bola (Darrell Fitton) - Metalurg (MV)",
"duration": 439,
"description": "Bola (Darrell Fitton) - Metalurg (MV)",
"src": "http://www.youtube.com/watch?v=_MYpOOMRAeQ",
"embed": true
}
]
},
"labels": {
"label": {
"catno": "SKA005",
"name": "Skam"
}
},
"companies": "",
"styles": {
"style": [
"Downtempo",
"Experimental",
"Ambient"
]
},
"formats": {
"format": {
"text": "",
"name": "Vinyl",
"qty": 1,
"descriptions": {
"description": [
"12\"",
"Limited Edition",
"33 ⅓ RPM"
]
}
}
},
"country": "UK",
"id": 1928,
"released": "1995-00-00",
"artists": {
"artist": {
"id": 390,
"anv": "",
"name": "Bola",
"role": "",
"tracks": "",
"join": ""
}
},
"title": 1,
"master_id": 13562,
"tracklist": {
"track": [
{
"position": "A1",
"duration": "4:33",
"title": "Forcasa 3"
},
{
"position": "A2",
"duration": "5:48",
"title": "Krak Jakomo"
},
{
"position": "B1",
"duration": "7:50",
"title": "Metalurg 2"
},
{
"position": "B2",
"duration": "6:40",
"title": "Balloom"
}
]
},
"data_quality": "Correct",
"extraartists": {
"artist": {
"id": 388200,
"anv": "",
"name": "Paul Solomons",
"role": "Mastered By",
"tracks": "",
"join": ""
}
},
"notes": "Limited to 480 copies.\nA1 is a shorter version than that found on the 'Soup' LP.\nA2 ends in a lock groove."
}
}
My intention is to count the mapped values. My mapping function is as follows:
function(doc){
if(doc.release)
emit(doc.release.title,1)
}
Map results shows around 5800 results
I want to use the following functions in the reduce tab to count:
Reduce:
_count or _sum
It does not give single rounded value. Even i cannot get the simple _count operations right !!! :(
for screenshot,
Please help me !!!
What you got was the sum of values per title. What you wanted, was the sum of values in general.
Change the grouping drop-down list to none.
Check CouchdDB's wiki for more details on grouping.
On photos and posts I often see location tags pointing to a Facebook page representing a place. They are typically prepended by "near" , "at" or "in". Does anybody know of a way to access this data via the graph API or any other way?
Here is an example :
webpage, I made the photo public so everyone can see http://www.facebook.com/photo.php?pid=11671735&id=506482094
api call https://graph.facebook.com/10150601497547095?access_token=*
{
"id": "10150601497547095",
"from": {
"name": "Edouard Tabet",
"id": "506482094"
},
"name": "Alcohol grows on trees in Isabela, Galapagos",
"picture": "http://photos-a.ak.fbcdn.net/hphotos-ak-snc7/381095_10150601497547095_506482094_11671735_110244218_s.jpg",
"source": "http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc7/s720x720/381095_10150601497547095_506482094_11671735_110244218_n.jpg",
"height": 720,
"width": 479,
"images": [
{
"height": 2048,
"width": 1365,
"source": "http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc7/329294_10150601497547095_506482094_11671735_110244218_o.jpg"
},
{
"height": 720,
"width": 479,
"source": "http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc7/s720x720/381095_10150601497547095_506482094_11671735_110244218_n.jpg"
},
{
"height": 270,
"width": 180,
"source": "http://photos-a.ak.fbcdn.net/hphotos-ak-snc7/381095_10150601497547095_506482094_11671735_110244218_a.jpg"
},
{
"height": 130,
"width": 86,
"source": "http://photos-a.ak.fbcdn.net/hphotos-ak-snc7/381095_10150601497547095_506482094_11671735_110244218_s.jpg"
},
{
"height": 112,
"width": 75,
"source": "http://photos-a.ak.fbcdn.net/hphotos-ak-snc7/381095_10150601497547095_506482094_11671735_110244218_t.jpg"
}
],
"link": "http://www.facebook.com/photo.php?pid=11671735&id=506482094",
"icon": "http://static.ak.fbcdn.net/rsrc.php/v1/yz/r/StEh3RhPvjk.gif",
"created_time": "2012-01-16T23:34:54+0000",
"position": 1,
"updated_time": "2012-01-21T02:16:55+0000",
"comments": {
"data": [
{
"id": "10150601497547095_7207114",
"from": {
"name": "Tom LeNoble",
"id": "218686"
},
"message": "hope you are having fun!",
"can_remove": true,
"created_time": "2012-01-16T23:36:33+0000"
},
{
"id": "10150601497547095_7207963",
"from": {
"name": "Sol McKinney",
"id": "1021642751"
},
"message": "How come Darwin didn't write about that?!",
"can_remove": true,
"created_time": "2012-01-17T01:31:39+0000"
},
{
"id": "10150601497547095_7212820",
"from": {
"name": "Romain BL",
"id": "556337447"
},
"message": "Des bisous mr Tabet! J'esp\u00e8re que tu vas bien depuis tout ce temps!",
"can_remove": true,
"created_time": "2012-01-17T18:19:13+0000"
}
],
"paging": {
"next": "https://graph.facebook.com/10150601497547095/comments?access_token="
}
},
"likes": {
"data": [
{
"id": "1404245",
"name": "Hannah Russin"
},
{
"id": "1278210658",
"name": "Seth Long"
},
{
"id": "218686",
"name": "Tom LeNoble"
}
],
"paging": {
"next": "https://graph.facebook.com/10150601497547095/likes?access_token=&limit=25&offset=25&__after_id=218686"
}
}
}
I figured it out... When accessing a photo with the "photo id" the place attribute is not present in the result... when accessing the same photo through its "post id" then the place attribute appears in the JSON result of the GRAPH API call. Not very convenient...
They should all have place:
https://developers.facebook.com/tools/explorer?method=GET&path=15500414_689594654776