目前在我的博客列表页面上显示10个分页的帖子,从每个帖子底部的博客列表页面我都有一个推文按钮来推特发帖。
推文按钮与文字一起正常工作,但我想用博客列表页面中的图片发布我的帖子。
我可以借助meta来发布详细信息页面中的图像
但是根据我在博客列表页面的客户要求,我应该开发一个带有图片推文的功能。
任何人都可以帮忙吗?
我目前的代码:
var afterSetExtremes = function(e) {
if (!firstTimeLoad) {
var fromDate = moment(Math.round(e.min)).format();
var toDate = moment(Math.round(e.max)).format();
var dataToSend = {
graph: selectedChannels,
fromDate: fromDate,
toDate: toDate
};
//API call
graphService.create({}, {}, dataToSend, {}).then(function(response) {
if (response.status) {
var hasData = false;
response.data.records.map(function(op) {
if (op.data.length) {
hasData = true;
}
});
if (hasData) {
graphData = response.data;
// Updating chart series data
chartConfig.series = graphData.records;
} else {
notify.error('No data found');
}
} else {
notify.error('No data found');
}
}, function(reason) {
notify.error('Application encountered some issues, please try again.');
});
}
firstTimeLoad = false;
};
var chartConfig = {
options: {
chart: {
renderTo: 'container',
type: 'spline',
zoomType: 'x'
},
legend: {
enabled: true
},
xAxis: {
events: {
afterSetExtremes: afterSetExtremes
}
},
yAxis: {
floor: 0,
labels: {
format: '{value} ' + data.unit
}
},
rangeSelector: {
buttons: [{
type: 'day',
count: 1,
text: '1d'
}, {
type: 'day',
count: 7,
text: '7d'
}, {
type: 'month',
count: 1,
text: '1m'
}, {
type: 'year',
count: 1,
text: '1y'
}, {
type: 'all',
text: 'All'
}],
buttonTheme: {
fill: 'none',
stroke: 'none',
'stroke-width': 0,
r: 8,
style: {
color: '#039',
fontWeight: 'bold'
},
states: {
hover: {},
select: {
fill: '#039',
style: {
color: 'white'
}
}
}
},
// inputEnabled: true, // it supports only days
selected: 4 // all
},
navigator: {
enabled: true,
adaptToUpdatedData: false,
series: {
includeInCSVExport: false
}
},
plotOptions: {
series: {
animation: {
complete: function() {
$(window).resize(function() {
resizeToCover();
});
$(window).trigger('resize');
$('#chart1').css('display', 'block');
}
}
}
},
scrollbar: {
liveRedraw: false
}
},
series: graphData.records,
title: {
text: 'Graph'
},
loading: false,
useHighStocks: true
};

提前致谢。