使用 Facebook 图按类别和他们的喜好获取相似的页面 API
Get similar pages by category and their likes using Facebook graph API
我在 Facebook grap 浏览器中使用这个 link 并且它有效
https://graph.facebook.com/v2.3/search?q=education?education&type=page
但是我试图在不提供 id 的情况下访问下面给出的代码中的相同数据,因为 id 给出了不存在的字段的错误
function Getpage()
{
FB.api("/search?q=education?education&type=page", function (response) {
});
}
它不起作用,但如果我尝试以这种方式访问,它会采用 http/graph/facebook/ as id
function Getpage()
{
FB.api(" /https://graph.facebook.com/v2.3/search?q=education?education&type=page", function (response) {
var i = 25;
var g = response.data[i];
});
}
它 return 与上述 link returns.
中的图表浏览器中的数据不同
我什至尝试了访问令牌,但使用 javascript 我应该如何获得相同类别的相似页面?像这样第一个 link returns in graph explorer
{
"data": [
{
"category": "Education",
"name": "EducationUSA",
"id": "72457958318"
},
{
"category": "Education",
"category_list": [
{
"id": "108051929285833",
"name": "College & University"
},
{
"id": "163917800330437",
"name": "Admissions Training"
},
{
"id": "181053558607965",
"name": "Youth Organization"
}
],
"name": "Education Diffusion",
"id": "180364528818411"
},
怎样才能得到他们的喜欢呢?
function Getpage()
{ FB.api("https://graph.facebook.com/search?q=education&type=page&access_token=token", function (response) {
//// var i = 25;
//var g = response.data[i];
});
}
仅将您的访问令牌添加到保证有效的令牌处
这是一个搜索查询
我在 Facebook grap 浏览器中使用这个 link 并且它有效
https://graph.facebook.com/v2.3/search?q=education?education&type=page
但是我试图在不提供 id 的情况下访问下面给出的代码中的相同数据,因为 id 给出了不存在的字段的错误
function Getpage()
{
FB.api("/search?q=education?education&type=page", function (response) {
});
}
它不起作用,但如果我尝试以这种方式访问,它会采用 http/graph/facebook/ as id
function Getpage()
{
FB.api(" /https://graph.facebook.com/v2.3/search?q=education?education&type=page", function (response) {
var i = 25;
var g = response.data[i];
});
}
它 return 与上述 link returns.
中的图表浏览器中的数据不同我什至尝试了访问令牌,但使用 javascript 我应该如何获得相同类别的相似页面?像这样第一个 link returns in graph explorer
{
"data": [
{
"category": "Education",
"name": "EducationUSA",
"id": "72457958318"
},
{
"category": "Education",
"category_list": [
{
"id": "108051929285833",
"name": "College & University"
},
{
"id": "163917800330437",
"name": "Admissions Training"
},
{
"id": "181053558607965",
"name": "Youth Organization"
}
],
"name": "Education Diffusion",
"id": "180364528818411"
},
怎样才能得到他们的喜欢呢?
function Getpage()
{ FB.api("https://graph.facebook.com/search?q=education&type=page&access_token=token", function (response) {
//// var i = 25;
//var g = response.data[i];
});
}
仅将您的访问令牌添加到保证有效的令牌处 这是一个搜索查询