gpt4 book ai didi

facebook - 重复页面重定向: How do I find the connection?

转载 作者:行者123 更新时间:2023-12-03 05:50:37 24 4
gpt4 key购买 nike

我正在开发一个 Facebook 应用程序,我想按学校过滤用户的 friend 。我遇到的问题是,当学校用户的重复页面可能不具有相同的页面 ID 时。

例如) http://www.facebook.com/pages/UT-Austin/106258719412206将重定向到http://www.facebook.com/UTAustinTX?rf=106258719412206

我无法找到任何有关如何查找这些重定向连接的信息。理想情况下我想要:

  1. 如果我尝试查看要重定向的页面,如上例所示;我被重定向到的页面 ID 是什么?
  2. 如果我有页面 ID;所有重复的页面 ID 都有哪些相关?

最佳答案

您可以尝试的一件事是图形搜索名称,最好是位置。在您的示例中,只需图形搜索名称即可提供新页面作为第一个结果。 https://graph.facebook.com/search?q=UT+Austin&type=place&access_token=YOURTOKEN

这并不理想,但我认为这是解决这个问题的唯一方法。

有几点需要注意:您可以根据您的情况比较域。
您的first node :

{
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

您的second node有相同的。

您可以使用 is_community_page: true 作为触发器,您应该通过图形搜索查找一些等效的 ID。并非在所有情况下都是如此,但因为您正在与大学打交道,我想每一所大学(至少在美国)都有一个声明的 FB 页面,在这种情况下 is_community_page 将为 false 或者属性不会存在(nil)。

此外,根据您的业务,您可以 MTurk 执行此任务,甚至可能使用抓取工具。我不认为这些是大规模解决这个问题的好解决方案,但我建议是因为如果您只与大学打交道,您可能负担得起 Mturk 或繁重的工作。

我确实确认您可以使用抓取工具来查找重定向 JavaScript 并解析出原始页面上的新 ID。

我知道这有点糟糕,但希望它有帮助

关于facebook - 重复页面重定向: How do I find the connection?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11801749/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com