查询“喜欢”的用户我的脸书页面

发布于 2024-10-20 16:33:59 字数 181 浏览 4 评论 0原文

我想知道是否可以查询以下内容:

  • 喜欢我的 Facebook 页面的(所有)用户列表,以及
  • 这些用户公开提供的其他信息(除了名字和姓氏)

基本上希望生成以下用户的详细营销统计数据如果可能的话,喜欢我的 Facebook 页面。欢迎任何建议或替代方案。

谢谢。

I was wondering if it was possible to query the following:

  • List of (all) users who like my facebook page, and
  • Additional information those users have made publicly available (beyond first and last name)

Basically looking to generate detailed marketing stats of users who like my facebook page, if possible. Any suggestions or alternatives welcome.

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

寻梦旅人 2024-10-27 16:33:59

恐怕这是不可能的,请关注此错误以获取更多信息。

另一个证据是 page_fan 表,您会注意到只有 uid 字段是可索引的,因此您需要知道用户 ID 才能搜索它,而不是page_id,如您所知,如果用户“喜欢”某个页面,则意味着他是该页面的“粉丝”。


在积极使用 Facebook API 一段时间后,并关注公告和 API 版本(和弃用)以及政策的引入和更改后,我可以了解到 Facebook 只会共享以下信息:让他们的用户明确这样做(也称为交互/授权您的应用程序)。

因此,在没有此类功能的情况下,最好的做法是:

  1. 通过页面洞察了解您的
  2. 受众 群体;通过页面选项卡创建自定义应用程序并使用其他 Facebook 功能(例如 问题

I am afraid this is NOT possible, follow this bug for more information.

Another proof is the page_fan table you will notice that only the uid field is indexable so you need to know the user id to search it and not the page_id, as you know if a user "likes" a page this would mean he is a "fan" of that page.


After being actively working with the Facebook API for a while now, and following the announcements and API releases (and deprecations) along with the introduction and changes of policies, I can understand that Facebook will only share info about their users by letting them explicitly do so (a.k.a interact/authorize your Apps).

And hence the best thing to do in the absence of such feature is:

  1. Understand your audience through Page Insights
  2. Collect fans interests & info by creating custom apps through Page Tabs and using other Facebook features like Questions
給妳壹絲溫柔 2024-10-27 16:33:59

好吧,没有人想破坏 Facebook 的服务条款,但他们把我们的手脚绑在了我们自己的基本数据上。因此,抓取是非法的,但不保存页面。我所做的(请注意,无论如何我都需要这个来实现离线目的):
转到 https://www.facebook.com/browse/?type=page_fans&page_id={粉丝专页 ID}
向下滚动,直到拥有所有粉丝。将此页面保存在本地计算机上,例如 Facebook.html。
现在,使用 ruby​​ 和 nokogiri:

require 'nokogiri'
>true
f = File.open('/your_path/Facebook.html')
doc = Nokogiri::HTML.parse(f.read)
doc.xpath('//div[@class="fsl fwb fcb"]/a').each {|link| puts link.content}

Alright, nobody wants to break Facebook's TOS but they have tied our hands on our own basic data. So, scraping is illegal, but not saving a page. What I have done (and note that I needed this for offline purpose anyway):
Go to https://www.facebook.com/browse/?type=page_fans&page_id={FAN PAGE ID}
Scroll down until you have all of your fans. Save this page on your local machine, let's say, Facebook.html.
Now, using ruby and nokogiri:

require 'nokogiri'
>true
f = File.open('/your_path/Facebook.html')
doc = Nokogiri::HTML.parse(f.read)
doc.xpath('//div[@class="fsl fwb fcb"]/a').each {|link| puts link.content}
情栀口红 2024-10-27 16:33:59

进行如下图搜索:“喜欢[你的粉丝专页的名字]的人”。你将会得到所有的结果。

然后使用此 JavaScript 代码在浏览器上创建快捷方式,它将单击“查看更多”链接并滚动,直到所有结果显示在页面中:

javascript: i = 0;minutes = 30;counter = minutes * 60;function repeatScroll() {
if (i < counter) {window.scrollTo(0, document.body.scrollHeight);i++;}    
setTimeout(repeatScroll, 1000);}repeatScroll();

之后,创建其他快捷方式并运行此 js 代码以从搜索结果中检索所有 UID:

javascript:var txt="";e=document.getElementsByClassName("FriendRequestOutgoing");
for(var i=0; i<e.length; i++) {v=e[i].getAttribute("data-profileid");
if(v) txt+=v+"\n"}document.body.innerHTML="<textarea>"+txt+"</textarea>";

屏幕上将出现一个文本区域框,其中包含所有 uid。只需将其复制到记事本并导入到 Facebook Ad Manager 中的自定义受众即可。

我每天创建并使用此代码来获取符合我需要的标准的所有 UID。
您可以启动任何您想要的图形搜索。
这是自制代码,因此使用它时您无需承担任何责任:)

享受它们。

Do a graph search likes this: "People who like [your fanpage's name]". You will all the result.

Then create shortcut on your browser with this javascripts code, it will click on the View more link and scrolling until all result are shown in the page:

javascript: i = 0;minutes = 30;counter = minutes * 60;function repeatScroll() {
if (i < counter) {window.scrollTo(0, document.body.scrollHeight);i++;}    
setTimeout(repeatScroll, 1000);}repeatScroll();

After that, create other shortcut and run this js code to retrieve all UID from the search result:

javascript:var txt="";e=document.getElementsByClassName("FriendRequestOutgoing");
for(var i=0; i<e.length; i++) {v=e[i].getAttribute("data-profileid");
if(v) txt+=v+"\n"}document.body.innerHTML="<textarea>"+txt+"</textarea>";

A textarea box will appear in the screen with all uid inside. Just copy it to your notepad and import into your Custom Audience in Facebook Ad Manager.

I created and use this code everyday to get all UID with criterial I need.
You can launch any graph search you want.
This is homemade code, so using it without your own responsibility :)

Enjoy them.

踏雪无痕 2024-10-27 16:33:59

这是可能的,只是不再使用 FQL。

执行 GET https://www.facebook.com/browse/?type=page_fans&page_id=< /a>{FAN PAGE ID} 并刮掉用户。

中提琴。

It's possible, just not with FQL anymore.

Do a GET of https://www.facebook.com/browse/?type=page_fans&page_id={FAN PAGE ID} and scrape out the users.

Viola.

高速公鹿 2024-10-27 16:33:59

现在,您可以通过此链接吸引人们访问您的页面,或者单击“设置”按钮,而不是单击左侧边栏上的“人员”。 https://www.facebook.com/[PAGENAME]/settings/?tab =people_and_other_pages

如果您想获取所有用户的照片,请按 F12 并将这些代码添加到控制台:

javascript:i=0;minutes=30;counter=minutes*60;function repeatScroll(){if(i<counter){window.scrollTo(0, document.body.scrollHeight);i++;}setTimeout(repeatScroll,1000);}repeatScroll();

然后,当您到达页面底部时:

javascript:var txt="";e=document.getElementsByClassName("img"); for(var i=0; i<e.length; i++) {v=e[i].getAttribute("src"); if(v) txt+="<img src='"+v+"'>\n"}document.body.innerHTML="<textarea>"+txt+"</textarea>";

要显示照片:创建一个 HTML 页面并首先插入这些行进入该文件:

<meta charset="utf-8">
<style>img { width:21px; margin:-1px; }</style>
<div style="width:851px; height:315px;background-color:white;">
<!-- PASTE HERE PHOTOS' CODE YOU GET -->
<span style="color:#3B5998;font-weight:bold;font-size:20px;margin-bottom:4px;">600 like, thank you!</span>
<!-- PASTE HERE PHOTOS' CODE YOU GET -->    
</div>

Now you can get people on your page with this link, or click on Settings button, than on People on the left sidebar. https://www.facebook.com/[PAGENAME]/settings/?tab=people_and_other_pages

If you want to get all the user's photo, press F12 and add these codes to the Console:

javascript:i=0;minutes=30;counter=minutes*60;function repeatScroll(){if(i<counter){window.scrollTo(0, document.body.scrollHeight);i++;}setTimeout(repeatScroll,1000);}repeatScroll();

than, when you reached the bottom of the page:

javascript:var txt="";e=document.getElementsByClassName("img"); for(var i=0; i<e.length; i++) {v=e[i].getAttribute("src"); if(v) txt+="<img src='"+v+"'>\n"}document.body.innerHTML="<textarea>"+txt+"</textarea>";

To display photos: create a HTML page and first insert these lines into that file:

<meta charset="utf-8">
<style>img { width:21px; margin:-1px; }</style>
<div style="width:851px; height:315px;background-color:white;">
<!-- PASTE HERE PHOTOS' CODE YOU GET -->
<span style="color:#3B5998;font-weight:bold;font-size:20px;margin-bottom:4px;">600 like, thank you!</span>
<!-- PASTE HERE PHOTOS' CODE YOU GET -->    
</div>
月下凄凉 2024-10-27 16:33:59

然后使用此 JavaScript 代码在浏览器上创建快捷方式,它将单击“查看更多”链接并滚动,直到所有结果显示在页面中:

i = 0;
minutes = 30;
counter = minutes * 60;
function repeatScroll() {
    if (i < counter) {
        window.scrollTo(0, document.body.scrollHeight);
        i++;
    }    
    setTimeout(repeatScroll, 1000);
}
repeatScroll();

之后,创建其他快捷方式并运行此 js 代码以从搜索结果中检索所有 UID:

var e=document.getElementsByClassName("fsl fwb fcb");
var ids = [];
for(var i = 0 ; i < e.length; i++){
  ids.push(JSON.parse(e[i].childNodes[0].getAttribute("data-gt")).engagement.eng_tid);
}
console.log(ids);

Then create shortcut on your browser with this javascript code, it will click on the View more link and scrolling until all result are shown in the page:

i = 0;
minutes = 30;
counter = minutes * 60;
function repeatScroll() {
    if (i < counter) {
        window.scrollTo(0, document.body.scrollHeight);
        i++;
    }    
    setTimeout(repeatScroll, 1000);
}
repeatScroll();

After that, create other shortcut and run this js code to retrieve all UID from the search result:

var e=document.getElementsByClassName("fsl fwb fcb");
var ids = [];
for(var i = 0 ; i < e.length; i++){
  ids.push(JSON.parse(e[i].childNodes[0].getAttribute("data-gt")).engagement.eng_tid);
}
console.log(ids);
听你说爱我 2024-10-27 16:33:59

加载所有列表

i = 0;
minutes = 30;
counter = minutes * 60;
function repeatScroll() {
    if (i < counter) {
        window.scrollTo(0, document.body.scrollHeight);
        i++;
    }    
    setTimeout(repeatScroll, 1000);
}
repeatScroll();

获取id

var e=document.getElementsByClassName("_3cb8");
var ids = [];
for(var i = 0 ; i < e.length; i++){
  ids.push(e[i].getAttribute("href"));
}
console.log(ids);

load all list

i = 0;
minutes = 30;
counter = minutes * 60;
function repeatScroll() {
    if (i < counter) {
        window.scrollTo(0, document.body.scrollHeight);
        i++;
    }    
    setTimeout(repeatScroll, 1000);
}
repeatScroll();

get id

var e=document.getElementsByClassName("_3cb8");
var ids = [];
for(var i = 0 ; i < e.length; i++){
  ids.push(e[i].getAttribute("href"));
}
console.log(ids);
九局 2024-10-27 16:33:59

您可以使用 facebook open graph 获取它。

https://graph.facebook.com//likes

例如:

https://graph.facebook.com/chickfila/likes

您需要使用“id”发送图形 api 调用,以获取有关喜欢您页面的用户的更多详细信息。

但是,此调用将检索该页面 (Chickfila) 喜欢的其他 Facebook 对象,而不是喜欢 Chickfila 页面的用户。

You can get it using facebook open graph.

https://graph.facebook.com/<your-page-name-or-page-id>/likes

For example :

https://graph.facebook.com/chickfila/likes

You need to send graph api call using "id" for more detail about user who like you page.

However, this call will retrieve the other Facebook objects that the page (Chickfila) has liked, NOT the users who have liked the Chickfila page.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文