是否可以抓取所有可见图像+您的一位朋友在 Facebook 上的标记位置?
我想选择一个用户(其图像是公开的并且对我来说是可见的,也就是 Facebook 上的当前朋友)并下载该人的所有可查看图片,以及他们在该图片中的标签位置。无论如何,这对我来说都是公开的,所以这不应该是一个问题,我只是不确定如何提取图像上的标记位置。
oyu 可以通过 Facebook API 或其他方式做到这一点吗?你会怎么做?
I want to select a user (whose images are public and viewable to me, aka a current friend on facebook) and download all viewable pictures of that person, along with the location of the tag of them in that picture. This is all publicly available to me anyway, so it shouldn't be an issue, I'm just not sure how to extract the tagged location on the image.
Is this something oyu can do through the Facebook API or through some other means? How would you do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
此信息无法通过他们的 Graph API 获得,因为获取用户信息需要用户授权您的应用程序,或者该人必须是批准您的应用程序的用户的朋友。你可以抓取 Facebook 的网站,但这违反了他们的服务条款,而且很棘手,因为他们采取了很多措施来防止抓取。
This information won't be available via their Graph API because getting user info requires the user to authorize your app, or the person must be friends with the user that approved your app. You could scrape Facebook's site but this is against their terms of service, and is tricky because they have a lot of measures put in place to prevent scraping.
您需要向用户请求
friends_photos
权限才能访问该信息。在未经用户明确授权的情况下下载用户照片是一种非常严重的行为令人讨厌和侵入性的事情(除了违反 Facebook 平台政策之外)。如果我看到这种行为,该应用程序将被坚决报告,并且您的个人帐户也将被停用或阻止打开新的应用程序,直到违规应用程序问题得到相应处理。
You will need to ask your users for the
friends_photos
permission in order to gain access to that information.Downloading a users photos with out his/her explicit authorization is a very nasty and intrusive thing to do (in addition to violating facebooks platform policies). If I were to see this behavior the application would defiantly be reported and the changes are that your personal account would also be deactivated or prevented from opening new applications until the violating application issue is dealt with accordingly.
我使用像下面的 AppleScript 这样的脚本,尽管它只生成缩略图的 URL 列表,而不是全尺寸图像,并且它不会标记位置。
我使用如下所示的脚本来创建较大版本图像的列表,这些图像的大小最大为 960 x 960 像素,因此它们并不总是完整尺寸的版本。
有些照片通常不会显示在所有照片的页面上,而是在单独浏览相册时显示。
https://www.facebook.com/profile.php?id=&sk=photos_albums
重定向到用户相册页面,https: //www.facebook.com/profile.php?id=&sk=photos_all
重定向到用户发布的所有照片的页面,并且https://www.facebook.com/<图像或用户的fbid>
重定向到图像或用户的页面。当我加载超过一千或几千个页面后,我的帐户有时会受到一周的限制,这样我就无法查看不是我朋友的用户的个人资料。
图像文件名中第二个下划线分隔字段中的数字是图像的 ID,例如
12208495_10102454385528521_4749095086285673716_n.jpg
中的10102454385528521
。用户 ID 是以
a.
开头的相册标识符中的最后一个数字,以及以fb.
开头的相册标识符中的第一个数字。https://www.facebook.com/photo/download/?fbid=
曾经被重定向到图像的完整尺寸版本,但今年早些时候停止工作。https://graph.facebook.com//picture?width=9999
被重定向到用户的完整尺寸个人资料图片,即使 Graph API 不可用,该图片仍然有效可用时间更长。I use a script like the AppleScript below, even though it only makes a list of the URLs of thumbnails and not full-size images, and it does not get tagged locations.
I use a script like the one below to make a list of larger versions of images, which are up to 960 by 960 pixels large, so that they are not always the full size versions.
Some photos are often not shown on the page for all photos but are shown when albums are browsed individually.
https://www.facebook.com/profile.php?id=<user id>&sk=photos_albums
is redirected to the page for the albums of a user,https://www.facebook.com/profile.php?id=<user id>&sk=photos_all
is redirected to the page for all photos posted by a user, andhttps://www.facebook.com/<fbid of image or user>
is redirected to the page for an image or a user.After I have loaded more than about a thousand or a few thousand pages, my account sometimes gets restricted for a week so that I cannot view the profiles of users who are not my friends.
The number in the second underscore-delimited field in the filename of an image is the ID of the image, or for example
10102454385528521
in12208495_10102454385528521_4749095086285673716_n.jpg
.The user ID is the last number in an album identifier that starts with
a.
and the first number in an album identifier that starts withfb.
.https://www.facebook.com/photo/download/?fbid=<fbid of photo>
used to be redirected to the full size version of an image, but that stopped working earlier this year.https://graph.facebook.com/<user id>/picture?width=9999
is redirected to the full size profile picture of a user, which still works even though the Graph API is no longer available.