Skip to Content
Menu

Deprecated

twitter_cache()

Generate a Twitter feed for a user or a list (can be called by AJAX).

PHP December 18, 2025

Deprecated

Usage

PHP
nebula()->twitter_cache($username, $listname, $number_tweets, $include_retweets)

Parameters

$username
(Required) (String) The username to pull the feed of
Default: Great_Blakes

$listname
(Optional) (String) If using a list, the name of the list
Default: None

$numbertweets
(Optional) (Integer) The number of Tweets to get
Default: 5

$includeretweets
(Optional) (Boolean) Whether to include retweets
Default: true

Parameter Notes

This function requires a Twitter Bearer Token to be generated and set in Nebula Options!

If calling this function by AJAX, the data object should use the parameter names without the “$”.

Request or provide clarification »

Examples

Get the full tweet with clickable usernames, hashtags, and URLs.

PHP
<?php
    $tweets = nebula()->twitter_cache('Great_Blakes');
    echo $tweet->markup;    //This key is added by Nebula
?>

Additional Notes

This function can be called as a PHP function or via JavaScript using AJAX.

Nebula adds a markup key to the Twitter object where it wraps detected strings in HTML tags (such as usernames, hashtags, and URLs in <a> tags).

The Nebula – Twitter Tweets widget uses this function.

Was this page helpful? Yes No


    A feedback message is required to submit this form.


    Please check that you have entered a valid email address.

    Enter your email address if you would like a response.

    Thank you for your feedback!