Download the PHP package srtfisher/open-graph-protocol-tools without Composer

On this page you can find all versions of the php package srtfisher/open-graph-protocol-tools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package open-graph-protocol-tools

Open Graph Protocol Tools

Open Graph protocol

Open Graph protocol enhances information associated with a webpage through key-value pairs included as <meta> elements in your HTML. This additional data is consumed by social sharing sites, populating a story preview for shared links and referenced objects in the social graph.

This project includes tools to validate and sanitize inputs before generating Open Graph protocol markup on your webpages. This project standardizes outputs for easy indexing by consuming agents. We also let you consume remote pages and attempt to parse the Open Graph tags there of.

Consuming agents

Facebook

Facebook indexes Open Graph protocol markup found on pages shared in a member's social news feed. This markup also enhances social news feed stories generated by the Like button social plugin and Facebook Share.

Open Graph protocol markup turns webpages into objects within the Facebook social graph, increasing search exposure and uniquely classifying your site and story type within the social news feed.

The Facebook Object Debugger displays a Facebook interpretation of your site's Open Graph protocol content.

mixi Check

Mixi indexes Open Graph protocol markup in its mixi Check social sharing service.

Google+ Snippet

Google indexes Open Graph protocol markup to populate a Google+ activity post.

Structure

The Application includes a number of core objects in the Open Graph protocol. They are all located under the OpenGraph namespace.

Objects:

Media:

Core Open Graph protocol

Support for structured properties for image, video, and audio objects.

Declare a new OpenGraphProtocol object and set some properties. Add structured media objects.

Output your OpenGraphProtocol object as HTML <meta> elements. Default configuration uses the property attribute from RDFa. Change to name if you prefer HTML specification compliance and consuming agents support the name attribute as a property fallback.

Global objects

Build global objects and attributes. Set time values using either an ISO 8601 formatted string or a DateTime object. DateTimes will be converted to the UTC timezone before output for consistency.

Convert a global object to <meta> elements just as you would with OpenGraphProtocol.

Combined

A common use case might be storing Open Graph protocol objects in a Controller for use by your web application. You can add each object to an array and later iterate through the array for <head prefix=""> and <meta> outputs.

Fetching

Commonly used in applications, fetching the contents of a remote page to get the Open Graph information can be a tedious task. Often time, you will have to get a webpage, write some regex to get the IMGs from it and MAYBE it'll work. Let us fix that.

That'll give you something that looks like this:

array (size=6)
  'description' => string 'Ayman al-Zawahiri, who has warned against Islamist parties taking part in elections, is emerging as a stronger leader than predicted' (length=132)
  'title' => string 'Al Qaeda leader's 'I told you so' on Egypt' (length=42)
  'type' => string 'article' (length=7)
  'url' => string 'http://www.cnn.com/2013/08/15/opinion/bergen-zawahiri-egypt/index.html' (length=70)
  'site_name' => string 'CNN' (length=3)
  'image' => string 'http://i2.cdn.turner.com/cnn/dam/assets/130815122452-08-egypt-0815-story-top.jpg' (length=80)

We're looking for ways to improve it still (find an image in the page's contents if og:image isn't specified). Stay tuned.


All versions of open-graph-protocol-tools with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
guzzle/guzzle Version v3.7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package srtfisher/open-graph-protocol-tools contains the following files

Loading the files please wait ....