如何抓取我不是管理员的Facebook页面



作为学术项目的一部分,我需要从Facebook页面刮取数据,其中我不是管理员,我做了一些研究,我发现这是可能通过Facebook开发者,但在这种情况下,我是页面的管理员。如果你有任何建议对我的情况有帮助,我将不胜感激。谢谢你

use:User Profile API:

可用配置文件字段

developers.facebook.com

默认情况下,你的应用程序可以检索id, name, first_name,Last_name和profile_pic字段用于已创建此操作的用户信息公开,并已选择加入您的页面。

本页用户配置文件API

用户配置文件API允许您使用页面范围ID (PSID)来检索用户配置文件信息,这些信息可用于个性化与您的Messenger交互的人的体验。内容

Availability
User Opt-in
Profile Unavailable
Available Profile Fields
Retrieving a Person's Profile
Last Ad Referral
Error Codes

可用性虽然您可能有PSID,但您可能没有权限或无法检索某人的个人资料信息。例如,即时游戏页面不允许使用这个API。用户选择

以下事件将授权您的Messenger bot访问某人的个人资料信息:

The person starts the conversation via a welcome screen and tapped the "Get Started" button.
The person starts the conversation by clicking a "Send to Messenger" button.
The person starts the conversation by sending a message.
The person starts the conversation by accepting a Page's message request.
Your Messenger bot uses the askPermission() function of the Messenger Extensions SDK in the webview to ask for the user_profile permission.

一些入口点允许你或其他人在不给你的机器人授权的情况下发起对话。在这些情况下,在用户回复初始消息后,您的Messenger bot将被授予访问用户配置文件的权限。值得注意的是,一个人可能会与你的Messenger bot发起对话,但没有授权配置文件权限,包括以下情况:

Conversations started via the Checkbox Plugin and the user did has not responded on Messenger.
Interactions with Ads that Click to Messenger before the user replies on Messenger

概要文件不可用

目前,用户配置文件API不支持检索使用电话号码而不是Facebook帐户创建的Messenger帐户的配置文件信息。

在这种情况下,API将返回错误代码2018218,并带有消息"此用户没有配置文件可用"。可用的配置文件字段

默认情况下,你的应用程序可能会检索id, name, first_name, last_name和profile_pic字段的用户已经公开了这些信息,并选择加入到你的页面。

应用程序可以通过API查询哪些字段对给定的页面可用。参见Feature Review API

可以请求以下配置文件字段:字段名称描述Feature Access

id用户的PSID

默认授予

名字

用户的姓和名

默认授予

first_name

名字

默认授予

last_name

的姓

默认授予

profile_pic

头像的URL。URL即将过期。

默认授予

语言环境

用户在Facebook上的区域设置。有关支持的语言环境代码,请参见supported locale。

这个页面级别的功能需要Facebook的批准

时区

时区,相对于GMT的数字

这个页面级别的功能需要Facebook的批准

性别

性别

这个页面级别的功能需要Facebook的批准请求对Page

用户字段的特性访问

进入页面设置>先进的消息在"Info About People"下选择该字段并点击"Request"按钮。

裁判:https://developers.facebook.com/docs/messenger-platform/identity/user-profile/

相关内容

最新更新