I like twitter and it has some basic features can empower your community, one of them is embed, you can embed it via tweet by tweet or you can do it with entering tweet ID. I created a little bbcode for it but not sure why its not working :/
array(
'tag' => 'tweet',
'type' => 'unparsed_content',
'content' => '',$tweet2['html'] ,'',
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';
global $tweet, $tweet2;
$tweet = file_get_contents(\'https://api.twitter.com/1/statuses/oembed.json?id=$1\');
$tweet2 = json_decode($tweet, true);
$tag[\'content\'] = $tweet2[\'html\'];
'),
'block_level' => true,
'disabled_content' => '$1'
),
Errors;
Undefined variable: tweet2
Undefined index: html
remove those damn slashes !!
Lainaus käyttäjältä: Herman's Mixen - helmikuu 14, 2014, 10:49:07 AP
remove those damn slashes !!
Parse error: syntax error, unexpected 'url' (T_STRING) in **\Sources\Subs.php on line 991
I still get "Undefined index: html" error and not outputting what it needs to :(
It returns the values, i added a screenshot, upper part using this code;
$tweet = file_get_contents("https://api.twitter.com/1/statuses/oembed.json?id=434084569902768129");
$tweet2 = json_decode($tweet, true);
echo $tweet2['html'];
Thank you - emanuele & Little Craw ^^