Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Twitter Feed

paulOrpaulOr New
edited May 2010 in Vanilla 1.0 Help
Twitter Feed
«1

Comments

  • Enjoy :)
  • Uploaded version v1.5 of Twitter Feed.
  • New version, might aswell :) fixed some bugs that appear when you enter an invalid username.
    Let me know what you think or what else you would like it to do :)
  • Uploaded version v1.6 of Twitter Feed.
  • OK LAST TIME TODAY :D

    your now able to choose how many tweets you want to show, 1 - 10, if less than 1, it shows 5(default) if more than 10 it shows 10.
  • Uploaded version v1.6 of Twitter Feed.
  • I like this, but it should also have a link to the persons twitter profile somewhere
  • good idea :) ill add soon
  • Uploaded version v1.6.1 of Twitter Feed.
  • Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /path/to/forum/extensions/Twitter/default.php on line 52 Warning: file_get_contents(http://search.twitter.com/search.atom?q=from:OACDPodcast&rpp=5) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /path/to/forum/extensions/Twitter/default.php on line 52 Notice: Undefined offset: 0 in /path/to/forum/extensions/Twitter/xml2array.class.php on line 86

    Yes it is a valid Twitter account!
  • You need to edit php.ini and set allow_url_fopen to ON, which will allow you to get offsite data (from twitter).
  • No way I can do that, my host won't let me.

    Looks like I'll have to revert to other widgets that don't require this setting.

    Thanks anyway.
  • Why are you using file_get_contents?

    You should use CURL and the available API to fetch the JSON-based content.

    eg;

    http://search.twitter.com/search.json?q=from:some_user_name

    You can then use json_decode() to drop it into a standard array and drop a little foreach/while magic on it.

    Much easier than doing a file_get_contents on the XML feed. Not mentioning that fact that most people won't enable allow_url_fopen since it's a horrendously unsafe "feature".

    If I can figure out the Vanilla methodology, I'll make the change and toss a patch/diff to you.
  • Here's a quick example;

    <?php
    $tweets = "http://search.twitter.com/search.json?q=from:GeekApp";

    $tw = curl_init();
    curl_setopt($tw, CURLOPT_URL, $tweets);
    curl_setopt($tw, CURLOPT_RETURNTRANSFER, TRUE);
    $twi = curl_exec($tw);

    var_dump(json_decode($twi));
    ?>

    No, I don't tweet very often.
  • awpti
    iv created a better way of doing it and will release the recode soon! thanks for the suggestions though.
  • Uploaded version v2 of Twitter Feed.
  • hi i installed twitter v1 and 2, but dont see in the page nothing, in settings twitter post can see it
    consumer key - consumer secret - user auth key - user auth secret, what is this?
    the user of foro can see your post from twitter every one? :( how? thanks
  • Hi, works a treat.. thanks!

    any ideas how I go about turning @usernames or #tags into links automatically?
  • I have added hovercards to take care of @usernames :)
Sign In or Register to comment.