也许使用 Facebook Graph API 并寻找只有页面才有的属性。例如,可口可乐 API 返回(见下文)likes
仅返回一个页面,您也可以查找description
, website
,about
但location
不要只依赖一个。相反,一个人会倾向于有一个first_name
和last_name
。统一使用这些来确定用户名是个人还是页面。
http://graph.facebook.com/zuck
{
"id": "4",
"name": "Mark Zuckerberg",
"first_name": "Mark",
"last_name": "Zuckerberg",
"link": "https://www.facebook.com/zuck",
"username": "zuck",
"gender": "male",
"locale": "en_US"
}
http://graph.facebook.com/cocacola
{
"id": "40796308305",
"name": "Coca-Cola",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/174560_40796308305_2093137831_s.jpg",
"link": "https://www.facebook.com/coca-cola",
"likes": 41519873,
"cover": {
"cover_id": "10150682306963306",
"source": "http://a7.sphotos.ak.fbcdn.net/hphotos-ak-snc7/s720x720/416803_10150682306963306_40796308305_9337341_812683101_n.jpg",
"offset_y": 0
},
"category": "Food/beverages",
"is_published": true,
"website": "http://www.coca-cola.com",
"username": "coca-cola",
"founded": "1886",
"description": "Created in 1886 in Atlanta, Georgia, by Dr. John S. Pemberton, Coca-Cola was first offered as a fountain beverage at Jacob's Pharmacy by mixing Coca-Cola syrup with carbonated water. \n\nCoca-Cola was patented in 1887, registered as a trademark in 1893 and by 1895 it was being sold in every state and territory in the United States. In 1899, The Coca-Cola Company began franchised bottling operations in the United States. \n\nCoca-Cola might owe its origins to the United States, but its popularity has made it truly universal. Today, you can find Coca-Cola in virtually every part of the world.",
"about": "The Coca-Cola Facebook Page is a collection of your stories showing how people from around the world have helped make Coke into what it is today.",
"location": {
"latitude": 53.71282619,
"longitude": -1.51214516
},
"checkins": 92,
"talking_about_count": 383754
}