I want to retrieve data from website to mobile application.I have used JSONP but it not work

I want to retrieve data from website to mobile application.I have used JSONP but it not work

BY 16 Oct 2015 Web Application Development

Hi,

   I have implemented but it not work.I have implemented in two ways.                            

$(document).ready(function () {
    $.getJSON(‘http://apibeta.yourstory.com/v1/sites’, function(jd) {
    alert(jd.social_media.facebook);    
    });


    });


——————————————————————————————

$.ajax({
    url: “http://otter.topsy.com/urlinfo.js?url=http://www.nytimes.com”,
    dataType: ‘jsonp’,
    success: function(results){
        var title = results.response.oneforty;
        var numTweets = results.response.trackback_total;
        $(‘#results’).append(title + ‘ has ‘ + numTweets + ‘ tweets.’);
    }
});

 

 

 

Please help me

Mohit Kumar

 

 

Written by