I am working mvc application i have tried to get facebook share count.
Can i get face book share count using only facebook AppId my code below Or (Could you please check my call back function which is working i got response as alert but there is in ajax method could not rendering it. is there any wrong please help me)
<img src="~/images/icons/fb.png" style="cursor: pointer; margin-left:
5px;" title="Facebook" onclick="sendRequest()" />
<script>
FB.https = true;
FB.init({
appId: '********',
cookie: true,
status: true,
xfbml: true
});
function sendRequest() {
var obj = {
method: 'feed',
link: 'https://www.oppd.org/p/' + '@Model.ProductId',
caption: '@Model.Message',
};
function callback(response) {
alert("Post ID: " + response['post_id']);
var PostId=response['post_id'];
var _url = '@Url.Action("Social")';
$.ajax({
url: _url,
type: "GET",
dataType: 'json',
success: function (data) {
}
});
}
FB.ui(obj, callback);
}