Gangsta

Fetch OpenGraph data from a url and display in ExpressionEngine templates
Alternatives To Gangsta
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Opengraph1201110 months ago20June 08, 20225mitPHP
A Laravel package to fetch Open Graph data of a website.
Webpage Rs3167 days ago11January 06, 20232Rust
Small Rust library to fetch info about a web page: title, description, language, HTTP info, RSS feeds, Opengraph, Schema.org, and more
Metaget20
2 years agomitJavaScript
A Node.js module to fetch HTML meta tags (including Open Graph) from a remote URL
Open_graph_reader18
100a year ago12October 13, 20213mitRuby
A library to fetch and parse OpenGraph properties from an URL or a given string.
Puppeteer Prerender14113 years ago67September 15, 2020mitJavaScript
Fetch the pre-rendered content, meta and Open Graph of a SPA
Linkpreviewkit12
17 years ago5February 19, 2016mitHTML
Library to fetch the social media meta tag information from a website URL
Url_scraper9
210 years ago3July 23, 20131mitJavaScript
Gangsta8
6 years agoapache-2.0PHP
Fetch OpenGraph data from a url and display in ExpressionEngine templates
Metadog727 years ago8November 02, 2016mitJavaScript
Sniffs out and fetches open graph and schema.org metadata from webpages.
Metalink4
7 months ago5Ruby
Metalink extracts information from URLs and provide uniformed and structured data using OpenGraph, JSON+LD, oEmbed and other meta tags.
Alternatives To Gangsta
Select To Compare


Alternative Project Comparisons
Readme

Gangsta

Version 1.0.1

This plugin allows you to fetch OpenGraph data from a url and display it in ExpressionEngine templates. Use it to create your own Facebook-style link cards.

Requirements

  • ExpressionEngine 2 or 3
  • PHP 5.3 or later with DOM extension

Installation

ExpressionEngine 2.x

Move the 'gangsta' folder to the ./system/expressionengine/third_party directory.

ExpressionEngine 3.x

Move the 'gangsta' folder to the ./system/user/addons directory.

Example use:

{exp:gangsta url="http://www.bbc.co.uk/news/world-europe-33406001"}    
<article>
	<header>
		<h1>{og:site_name}</h1>
	</header>
	<a href="{og:url}">
		<img src="{og:image}" alt="">
	</a>
	<h2><a href="{og:url}">{og:title}</a></h2>
	<p>{og:description}</p>
</article>
{/exp:gangsta}

Parameters

url=""

The URL to fetch OpenGraph data from.

prefix=""

Prefix for variables. Defaults to "og".

Variables

All metadata values found on the referenced webpage are returned as variables for use inside the {exp:gangsta}...{/exp:gangsta} tag pair. These variables vary per site, but will usually include:

{og:url}

The URL of the webpage.

{og:site_name}

The name of the website hosting the referenced webpage.

{og:title}

The title of the webpage.

{og:image}

An image associated with the webpage. Note that only images with one of the following extensions will work:

  • gif
  • jpg
  • jpeg
  • png
  • bmp
  • tif
  • tiff
  • webp

{og:description}

A description of the webpage.

Use conditionals to check for the existence of a variable if you are unsure that the referenced site provides them.

Popular Opengraph Projects
Popular Fetch Projects
Popular Data Formats Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Php
Fetch
Webpage
Opengraph