Get data from a facebook page wall or group wall for use on personal website

前端 未结 4 1361
遥遥无期
遥遥无期 2021-01-31 06:14

I want to connect to public facebook page or group and list all entries from the wall on a personal website. I will use PHP on my server so that would be the best solution for m

4条回答
  •  醉梦人生
    2021-01-31 06:29

    In JavaScript (jQuery).

    You can use my spare access_token for viewing public groups or pages ;)

    To get your own access token the facebook graph explorer can generate one for you (as well as test queries).

    In Javascript we make a request to facebook graph, which returns a JSON object. The response looks like this.

    The code below iterates though each entry and prints out the message, if you look at the link above it gives you the naming convention for the other data fields.

    for example:

    data.data[0].created_time;
    data.data[0].from.name;
    

    etc..

    Hope that Helps!

    
    
    
    
    
    
    
    

提交回复
热议问题