Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Twitter oEmbed #18

Merged
merged 1 commit into from

2 participants

@briandrum

I have added a service for Twitter oEmbed. Twitter supports a bunch of params, so if you ever get that working it would be great.

Thanks for a great field, and please let me know if you find any problems.

@nitriques
Owner

Great, this is nice !
I will pull your request right now, but I will add it to the dev branch too, maybe I'll have some refactoring to do to your code.
I need to add the meta.xml file for the Symphony site too !

@nitriques nitriques merged commit 6118cbb into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 29, 2012
  1. @briandrum

    Add Twitter service

    briandrum authored
This page is out of date. Refresh to see the latest.
Showing with 32 additions and 0 deletions.
  1. +32 −0 lib/drivers/class.serviceTwitter.php
View
32 lib/drivers/class.serviceTwitter.php
@@ -0,0 +1,32 @@
+<?php
+
+ if (!defined('__IN_SYMPHONY__')) die('<h2>Symphony Error</h2><p>You cannot directly access this file</p>');
+
+ class serviceTwitter extends ServiceDriver {
+
+ public function __construct() {
+ parent::__construct('Twitter', 'twitter.com');
+ }
+
+ public function about() {
+ return array(
+ 'author' => array(
+ 'email' => 'brian@briandrum.net',
+ 'name' => 'Brian Drum',
+ 'website' => 'http://briandrum.net'
+ ),
+ 'name' => $this->Name,
+ 'release-date' => '2012-01-27',
+ 'version' => '1.0'
+ );
+ }
+
+ public function getOEmbedXmlApiUrl($params) {
+ $url = rawurlencode($params['url']);
+ return 'https://api.twitter.com/1/statuses/oembed.xml?url=' . $url;
+ }
+
+ public function getIdTagName() {
+ return 'url';
+ }
+ }
Something went wrong with that request. Please try again.