How to show facebook feed messages from my site without access_token?

后端 未结 5 796
刺人心
刺人心 2021-01-01 06:02

I have a facebook site (site, not profil wall) and would like to display the message feed on a webpage. This already works fine if I use

https://graph.facebo         


        
5条回答
  •  攒了一身酷
    2021-01-01 06:34

    Although this question has already been answered. I hope this might help someone else.

    I've been developing a plugin for an inhouse CMS that needed to pull a facebook feed straight from JUST the users url. This is what I ended up with.

    $url = 'url_pulled_from_database';
    $url = str_replace('http://www.', 'http://graph.', $url);
    $get_id = file_get_contents($url);
    $get_id = json_decode($get_id, true);   
    $fbID = $get_id['id'];
    
    //THEN CALL THE FUNCTION        
    fb_parse_feed($fbID, $maxnumber);
    

    I cant take credit for the fb_parse_feed function, but you can find it here https://gist.github.com/banago/3864515

    Once implemented, it worked like a charm on any public page just by using the url.

提交回复
热议问题