开发者

Facebook API search entirely JS

开发者 https://www.devze.com 2023-04-11 15:47 出处:网络
var url = \"http://graph.facebook.com/search?q=\" + keyword + \"&type=post\"; $.get(url, function(data) { etc..
var url = "http://graph.facebook.com/search?q=" + keyword + "&type=post"; 
$.get(url, function(data) { etc..

Trying to pull this directly through javascript and needs to be js. I keep getting d开发者_如何学运维enied. What is the authentication for an app through JS to take care of this


Try this:

$.get('http://graph.facebook.com/search',{'q':keyword,'type':'post'}, function(data){},'javascript');

It might work--- If not, $.getScript ?


Try using the FB.api call:

FB.api('/search', {'q': keyword, 'type': 'post'}, function(response)
{
    // handle response
});
0

精彩评论

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