Exemple #1
0
	function socialpost () {
		
		$status = $this->input->post('value');
		
		if ($this->twitter->tweet($status));
		
		echo parse_tweet($status);
	}
function get_tweet($tweet_id)
{
    $bearer_token = fetch_bearer_token(TOKEN_FILE);
    $tweet = get_raw_tweet_by_id($bearer_token, $tweet_id);
    // $tweet = get_tweet_by_id($bearer_token,'649137197539');
    try {
        return parse_tweet($tweet);
    } catch (Exception $e) {
        echo 'Caught exception: ', $e->getMessage(), "\n";
    }
}
                echo $item->user->profile_image_url;
                ?>
" alt="">
                      <a href="https://twitter.com/<?php 
                echo $item->user->screen_name;
                ?>
"><?php 
                echo $item->user->name;
                ?>
</a><br><span>@<?php 
                echo $item->user->screen_name;
                ?>
</span>
                    </div>
                    <p><?php 
                echo parse_tweet($item->text);
                ?>
</p>
                    <div class="social__slider--feed__meta">
                      <a href="https://twitter.com/intent/favorite?tweet_id=<?php 
                echo $item->id;
                ?>
"><i class="fa fa-star"></i></a>
                      <a href="https://twitter.com/intent/retweet?tweet_id=<?php 
                echo $item->id;
                ?>
"><i class="fa fa-retweet"></i></a>
                      <a href="https://twitter.com/intent/tweet?in-reply-to=<?php 
                echo $item->id;
                ?>
"><i class="fa fa-reply"></i></a>
Exemple #4
0
				</tr>
			</table>
		</div>
		<h4>Feature Codes</h4>
		<div>
			<table>
				<tr>
					<td>Check Voicemail</td>
					<td class="justr"><a href="#" class="click2call">*97</a></td>
				</tr>
				<tr>
					<td>Conference Call</td>
					<td class="justr"><a href="#" class="click2call">200</a></td>
				</tr>
			</table>
		</div>
	</div>

	<?php 
		$twitter = $this->twitter->get_status('glabstudios');
		if ($twitter) : 
	?>
	<div class="widget" data-sortable="false">
		<h3 class="handle">Twitter</h3>
		<div id="twitter" cite="http://twitter.com/<?=$twitter->user->screen_name?>/status/<?=$twitter->id?>">
			<p id="post_content"><?=parse_tweet($twitter->text)?></p>
			<p>Last updated <span id="updated"><?=date_relative(strtotime($twitter->created_at))?></span>.</p>
		</div>
	</div>
	<?php endif; ?>
</div>
 /** @test */
 public function it_parses_complex_tweet_4()
 {
     $actual = parse_tweet("@james2doyle you need to visit https://warpaintmedia.ca because it is #cool!");
     $expected = "<a title=\"@james2doyle\" href=\"http://twitter.com/james2doyle\" target=\"_blank\">@james2doyle</a> you need to visit <a href=\"https://warpaintmedia.ca\" target=\"_blank\">https://warpaintmedia.ca</a> because it is <a title=\"#cool\" href=\"https://twitter.com/search?q=%23cool&src=hash\" target=\"_blank\">#cool</a>!";
     $this->assertEquals($actual, $expected);
 }
function departure_display_tweet($twit, $hash_tag = '')
{
    $time_format = time_difference(strtotime($twit->created_at));
    $hash_tag = '';
    $html = '<li>
				<div class="photo-wrap">
					<a href="http://twitter.com/' . $twit->from_user . '" title="' . $twit->from_user . '"><img src="' . $twit->profile_image_url . '" alt="' . $twit->from_user . '"  width="40" height="40" /></a>
				</div>' . parse_tweet($twit->text) . ' <a href="http://twitter.com/?status=@' . $twit->from_user . '%20&in_reply_to_status_id=' . $twit->id_str . '&in_reply_to=' . $twit->from_user . '" target="_blank"> </a>' . $hash_tag . '<span class="date"><a href="http://twitter.com/' . $twit->from_user . '/status/' . $twit->id_str . '" target="_blank">' . $time_format . '</a></span>
			</li>';
    return $html;
}