Home feed get specific links

China☆狼群 提交于 2019-12-25 07:48:46

问题


So I want to get linked typed post from users home stream But I want it to have specific url like "where link url = example.com"

As a result I will have a data of my friends who had shared that link.

First I tried querying the home with

https://graph.facebook.com/me/home?q=example (worked but partly, only old posts)

Then I did:

friends_id = [Get all ids]
[foreach friends_id as id]

    make facebook api call to that id
    get all links that user had shared
    [foreach links as link]

        filter all of them for a specific link        
        [if shared the link] save user to an array

And that was really slow! 6 sec for a person

And lastly I tried to get it with fql using stream and stream filter. The problem with that I can get posts but I can't query what is that link

Printing the array gives me:

        [post_id] => **********
        [actor_id] => *******
        [target_id] => 
        [message] => 
        [action_links] => 
        [type] => 80

So how can I achieve my goal of having an array of data of my friends who had shared that link?


回答1:


Sorry, only possible by using friends_id = [Get all ids] [foreach friends_id as id]

make facebook api call to that id
get all links that user had shared
[foreach links as link]

    filter all of them for a specific link        
    [if shared the link] save user to an array


来源:https://stackoverflow.com/questions/9693546/home-feed-get-specific-links

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!