3

ユーザーの友達を学校でフィルタリングしたいFacebookアプリケーションを開発しています。私が抱えている問題は、学校のユーザーのページが重複している場合、同じページIDを持っていない可能性があることです。

例)http://www.facebook.com/pages/UT-Austin/106258719412206はhttp://www.facebook.com/UTAustinTX?rf=106258719412206にリダイレクトされます

これらのリダイレクト接続を見つける方法に関する情報を見つけることができませんでした。理想的には:

  1. 上記の例のようにリダイレクトされるページを表示しようとしている場合。リダイレクト先のページIDは何ですか?
  2. ページIDを持っている場合; 重複するページIDはすべて関連していますか?
4

1 に答える 1

0

あなたが試すことができる1つのことは、名前と理想的には場所をグラフ検索することです. あなたの例では、名前をグラフで検索するだけで、最初の結果として新しいページが提供されました。 https://graph.facebook.com/search?q=UT+Austin&type=place&access_token=YOURTOKEN

理想的ではありませんが、これに対処する唯一の方法だと思います。

いくつかの注意事項: 状況に応じてドメインを比較できます。
最初のノード:

{
category: "University",
description: "The University of Texas at Austin is a public research-intensive university located in Austin, Texas, United States. It is the flagship institution of the University of Texas System. Founded in 1883, its campus is approximately 0.25 miles from the Texas State Capitol in Austin. The institution has the fifth-largest single-campus enrollment in the nation, with over 50,000 undergraduate and graduate students and over 24,000 faculty and staff.The University of Texas at Austin was named one of the original eight Public Ivy institutions and was inducted into the American Association of Universities in 1929. The university is a major center for academic research, with research expenditures exceeding $640 million for the 2009–2010 school year. The university houses seven museums and seventeen libraries, including the Lyndon Baines Johnson Library and Museum and the Blanton Museum of Art, and operates various auxiliary research facilities, such as the J. J. Pickle Research Campus and the McDonald Observatory. Among university faculty are recipients of the Nobel Prize, Pulitzer Prize, the Wolf Prize, and the National Medal of Science, as well as many other awards.",
is_community_page: true,
is_published: true,
talking_about_count: 8,
website: "http://www.utexas.edu",
were_here_count: 0,
id: "106258719412206",
name: "UT Austin",
link: "http://www.facebook.com/pages/UT-Austin/106258719412206",
likes: 5143
}

www.utexas.eduがあります

2番目のノードも同じです。

おそらく、is_community_page: trueグラフ検索で同等の ID を探すトリガーとして使用できます。すべての状況に当てはまるわけではありませんが、大学を扱っているため、(少なくとも米国では) すべての大学が FB ページを所有しているとis_community_page考えられます。この場合、false または属性が存在しない (nil) ことになります。

また、ビジネスによっては、このタスクを MTurk したり、おそらくスクレーパーを使用したりすることもできます。これらが大規模な問題を解決するための優れたソリューションであるとは思いませんが、大学だけを扱っている場合は、おそらく Mturk やこすり落としの重い物を持ち上げる余裕があるので、提案しています。

スクレイパーを使用してリダイレクトする JavaScript を探し、元のページの新しい ID を解析できることを確認しました。

私はこれがちょっとひどいことを知っていますが、うまくいけばそれが役に立ちます

于 2013-07-19T00:10:35.093 に答える