Coder Social home page Coder Social logo

easy_get_facebook_posts's Introduction

SO, HOW DO I USE THIS?!

Use the following code to get the Facebook Posts:

$fields = array(
	FIELDS YOU NEED
);

$fb_posts = json_decode(file_get_contents('https://yourdomain.com/fb.php?p=PAGENAME&fields='.implode(',', $fields)), true);

You can also send an extra parameter in the file_get_contents above. The parameter is: type This can be used to pull out Events, a certain page has created (parameter: &type=events). Events has other fields than the below described. These fields can be found here: https://developers.facebook.com/docs/graph-api/reference/event

In the $fields-array, enter each field you want to get. This can make the call easier, if you only need the image and url from the post, and not all likes, shares etc. Enter the name of the page (facebook.com/PAGENAME/) where it says PAGENAME in the url. The pagename should also be inserted in the $pages-array in this file.

Description of fields

  • id
    • Gets the Facebook-id of the post.
  • created_time
    • Gets the date of the post.
  • full_picture
    • Gets the full-size image of the post.
  • message
    • Gets the message of the post.
  • link
    • Gets the link the post links to (fx. youtube video or website).
  • permalink_url
    • Gets the url for the post on Facebook.
  • shares
    • Gets the amount of shares the post have.
  • type
    • Gets what type the post is. Fx. "video" or "link".
  • likes.summary(true)
    • Gets all LIKE-reactions of the post.
  • reactions.type(LOVE).summary(true)
    • Gets all LOVE-reactions of the post. "LOVE" can be exchanged with WOW, SAD, LIKE, ANGRY.

easy_get_facebook_posts's People

Stargazers

Mirozo avatar Jason Todd avatar

Watchers

James Cloos avatar Rasmus Bihl Andersson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.