开发者

ajax call returns null in my facebook iframe

I am using jquery to send an ajax request from my facebook app which is in iframe to my server. The ajax request works fine when the web app is running stand alone and out of facebook platform, but within facebook, the result that I get from my ajax re开发者_运维问答quest is blank !!! Here is the code I use:

$.ajax({
    url: 'http://mydomain.com/search',
    data: params,
    cache: false,
    dataType: 'json',
    success: function(posts) {
                // post is null !!!!!
             }
    error: function(json) {
                alert('error');
            }            
    });

I appreciate if anybody can help me with it.

Thanks.

uhsp


Ok I solved it myself. It was a cross domain issue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜