Solved! Go to Solution.
var features = [];
dojo.forEach(response.items, function (item, idx) { // idx is used as the object id
var attr = {};
attr["description"] = item.description;
attr["title"] = item.title ? item.title : "Flickr Photo";
attr["ObjectID"] = idx; // populate the feature's object id
var geometry = esri.geometry.geographicToWebMercator(new esri.geometry.Point(item.longitude, item.latitude, map.spatialReference));
var graphic = new esri.Graphic(geometry);
graphic.setAttributes(attr);
features.push(graphic);
});
nliu's recommendation is the path you should take- create a feature layer from a feature collection and you'll be able to use that with the legend dijit.