-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoembed.php
More file actions
28 lines (21 loc) · 774 Bytes
/
Copy pathoembed.php
File metadata and controls
28 lines (21 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
require_once('twitter_proxy.php');
require_once('config.php');
// defaults
$id = 719870230982500400;
if(isset($_GET['id'])){
$id = $_GET['id'];
}
$twitter_url = '1/statuses/oembed.json';
$twitter_url .= '?url=https://twitter.com/Interior/status/' . $id;
// Create a Twitter Proxy object from our twitter_proxy.php class
$twitter_proxy = new TwitterProxy(
$oauth_access_token, // 'Access token' on https://apps.twitter.com
$oauth_access_token_secret, // 'Access token secret' on https://apps.twitter.com
$consumer_key, // 'API key' on https://apps.twitter.com
$consumer_secret // 'API secret' on https://apps.twitter.com
);
// Invoke the get method to retrieve results via a cURL request
$tweet = $twitter_proxy->get($twitter_url);
echo $tweet;
?>