2

Unfortunately the documentation for CE Tweet is unclear so I would like to query the set up and to be guided in the right direction. How do I configure my twitter account details into the plugin?

As mentioned in the CE Tweet documentation I have a created a channel named twitter and a channel field group titled {tweet_feed}. I am trying to setup a single tweet feed on my site. First I have added <script type="text/javascript" src="//platform.twitter.com/widgets.js"></script> into my template, then I have embedded the following code into my template:

{exp:ce_tweet:user_timeline field="tweet_feed" screen_name="CharlesCompany" lang:en' count="1"}
  <div class="ce_tweet">
    <div class="ce_tweet_left">
      <a class="ce_tweet_username" href="http://twitter.com/{user_screen_name}" target="_blank"><img src="{user_profile_image_url}" alt="{alt}" /></a>
    </div><!--CE TWEET LEFT ENDS HERE-->
    <div class="ce_tweet_right">
        <div class="ce_tweet_row">
            <a class="ce_tweet_username" href="http://twitter.com     user_screen_name}" target="_blank">{user_name}</a>
            <a class="ce_tweet_name" href="http://twitter.com/{user_screen_name}" target="_blank">{user_screen_name}</a>
        </div><!-- .ce_tweet_row -->
        <div class="ce_tweet_row ce_tweet_text">{text}</div>
        <div class="ce_tweet_row ce_tweet_actions">
            <a class="ce_tweet_time" href="https://twitter.com/{user_screen_name}/statuses/{id_str}" title="{created_at format="%g:%i %A, %M %j%S (%T)"}" target="_blank"><span class="icon-twitter"></span> {created_at_relative}</a>
            <a class="ce_tweet_reply" href="https://twitter.com/intent/tweet?in_reply_to={id_str}" target="_blank"><span>Reply</span></a>
            <a class="ce_tweet_retweet{if retweeted} ce_tweet_retweeted{/if}" href="https://twitter.com/intent/retweet?tweet_id={id_str}" target="_blank"><span>Retweet</span></a>
            <a class="ce_tweet_favorite{if favorited} ce_tweet_favorited{/if}" href="https://twitter.com/intent/favorite?tweet_id={id_str}" target="_blank"><span>Favorite</span></a>
        </div><!-- .ce_tweet_row -->
    </div><!-- .ce_tweet_right -->
  </div><!--CE TWEET ENDS HERE --> 
{/exp:ce_tweet:user_timeline}

My confusion is what else I need to add in order for my tweets to be visible on my site?

4 Answers 4

3

A few thoughts:

  • Have you read the plugin's user timeline documentation? It makes no reference to a field parameter nor is there any indication that the plugin integrates with the channel module. I'm not sure why you've created a twitter channel but it sounds as though you're trying to do something that the plugin doesn't support.

  • If ever you're debugging something the first step is usually to remove all extraneous code. The same applies when posting questions to StackExchange. I'd suggest removing everything within the {exp:ce_tweet:user_timeline} tags and replacing it with a simple {text} var (since that should output the text of individual tweets).

  • Recent versions of the Twitter API require OAuth credentials for all requests. I'm not sure which API endpoint this add-on uses but the installation instructions make it clear that you need to setup OAuth tokens. Have you done that?

1
  • Cheers, i was wasn't aware of the configuration side of things
    – NewBoy
    Nov 29, 2012 at 12:54
3

You need to configure your API access via ExpressionEngine's config.php file, where you'll need to add this:

//CE Tweet
$config['ce_tweet_consumer_key'] = 'consumer_key_here';
$config['ce_tweet_consumer_secret'] = 'consumer_secret_here';
$config['ce_tweet_oauth_token'] = 'access_token_here';
$config['ce_tweet_oauth_secret'] = 'access_token_secret_here';

http://www.causingeffect.com/software/expressionengine/ce-tweet/installation

2

If you want tweets made by user CharlesCompany then you should be using the user_timeline tag which can be found here:

http://www.causingeffect.com/software/expressionengine/ce-tweet/tags/user_timeline

The search tag is for making search queries and is what you seem to be using in your code.

0

For the search query, you would need to have additional tags withing {results}{/results}. see: http://www.causingeffect.com/software/expressionengine/ce-tweet/tags/search

3
  • Thanks. For some reason my tweets are not display...i have edited my quest with new code
    – NewBoy
    Nov 28, 2012 at 23:55
  • note sure if this is throwing anything off, but what is lang:en' in the first tag?
    – Mel
    Nov 29, 2012 at 0:13
  • i seen it in the example, i'll remove to see what happens. - I did and still no joy
    – NewBoy
    Nov 29, 2012 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.