Get JSON Facebook Graph API User Info with jQuery

后端 未结 2 1769
[愿得一人]
[愿得一人] 2021-02-10 02:26

I am trying to use the graph API to get just some basic info about a user no need for authorization by the user just the public details. I am trying to use jQuery and the .getJS

2条回答
  •  梦毁少年i
    2021-02-10 03:08

    You have to use jsonP for cross domain issues:

    $.get(fburl, function(data){
        console.log(data);
        alert(data.name);
    },'jsonp');
    

    Fiddle: http://jsfiddle.net/maniator/34m9J/

提交回复
热议问题