Changeset 81312 in spip-zone
- Timestamp:
- Mar 12, 2014, 5:32:48 PM (5 years ago)
- Location:
- _plugins_/oeproxy
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/oeproxy/oeproxy/twitter.php
r54619 r81312 38 38 // and let oEmbed handle the response. 39 39 // fetch http://api.twitter.com/1/statuses/show/$tweet.json 40 $apiurl = 'http://api.twitter.com/1/statuses/show/'.$tweetid.'.json'; 40 //$apiurl = 'http://api.twitter.com/1/statuses/show/'.$tweetid.'.json'; 41 $apiurl = 'https://api.twitter.com/1/statuses/oembed.json?id='.$tweetid; 41 42 if (!$result = recuperer_page_cache($apiurl)){ 42 43 spip_log("could not fetch $apiurl",'oep_twitter'); … … 51 52 } 52 53 54 55 $data->html = trim(preg_replace(",<script\b[^>]*></script>,Uims","",$data->html)); 56 57 53 58 #var_dump($data); 59 60 // obsolete, plus possible 61 /* 54 62 // Now extract a few variables from the $data object 55 63 #$created_at = date('d M Y g:i a', strtotime( $data->created_at ) ); … … 79 87 'name' => $data->user->name 80 88 ); 81 89 */ 82 90 83 91 $result = array( … … 96 104 // html (required) 97 105 // The HTML required to display the resource. The HTML should have no padding or margins. Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities. The markup should be valid XHTML 1.0 Basic. 98 'html' => trim(recuperer_fond('modeles/oeproxy/twitter',$contexte)),106 'html' => $data->html, 99 107 100 108 // width (required) … … 108 116 // author_name (optional) 109 117 // The name of the author/owner of the resource. 110 'author_name' => $data-> user->name,118 'author_name' => $data->author_name, 111 119 112 120 // author_url (optional) 113 121 // A URL for the author/owner of the resource. 114 122 // NIY 115 'author_url' => "http://twitter.com/".$data->user->screen_name,123 'author_url' => $data->author_url, 116 124 117 125 -
_plugins_/oeproxy/paquet.xml
r59537 r81312 2 2 prefix="oeproxy" 3 3 categorie="outil" 4 version="0.8. 4"4 version="0.8.5" 5 5 etat="experimental" 6 6 compatibilite="[3.0.0-beta;["
Note: See TracChangeset
for help on using the changeset viewer.