Code Monkey home page Code Monkey logo

facebook-tools's Introduction

##Functionality Build Status Scrutinizer Code Quality Code Coverage Build Status codecov.io

Latest Stable Version Latest Unstable Version Total Downloads License Monthly Downloads Daily Downloads

Dependency Status Reference Status

codecov.io

  • Add a like button to any page
  • Add a facebook like box to any page
  • Add facebook metadata to any page

Installation

composer require "weboftalent/facebook-tools:~1"

The name of the output directory does not matter

Usage

Site Configuration

A 'Facebook Metadata' tab will now appear in the Site Config. There you can upload an image that will be shown in Facebook when a link from the site is provided. Otherwise facebook tries to guess from the content.

Templates

Facebook API

Add the following to your Page templates, after the body tag.

<% include DownloadFacebookJS %>

This will provide the Javascript required to load the Facebook API. It is a necessary step for what follows.

Like Button

Insert the following where you would like the Like Button to appear

<% include FacebookLikeButton %>

Facebook Metadata

In the head section of your Page template, insert the following:

<% include FacebookMetadata %>

This will provide basic metadata extracted from existing page information, and also add the logo if you have provided one in the SiteConfig 'Facebook Metadata' tab.

Content Types

FacebookLikeBoxPage

Create a page of type 'Facebook Like Box Page'. In the Facebook tab, enter the URL of your page (e.g. http://www.facebook.com/WebOfTalentLtd). If you do not do this an error message will appear on the page in the public version of the site.

Silverstripe Version Compatibility

2.4 only (tested with 2.4.5+) - stable24 branch 3.1

facebook-tools's People

Contributors

gordonbanderson avatar

Watchers

 avatar

Forkers

helpfulrobot

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.