Skip to:
Content
Pages
Categories
Search
Top
Bottom

Import Twitter Feed (not buddystream)


  • RobFenech
    Participant

    @terydinho

    Hi all,

    I want to take a leaf out of Bantr’s books (http://bantr.tv/) who basically get your favourite soccer team and import their player tweets to your activity stream.

    is there a way to do this in BP? I would like to import several celebrity tweets to the main activity stream for a new niche site. Any ideas?

    Thanks
    Rob

Viewing 13 replies - 1 through 13 (of 13 total)

  • modemlooper
    Moderator

    @modemlooper

    I’m going to update the bp External blogs plugin in a few days and it will import tweets to a groups activity stream.


    CJ Kruger
    Participant

    @cj-kruger

    @modemlooper, will it be saving it and posting as a ‘activity type’ and not simply fetching the feed? Could you please explain how you plan on doing it as I have a similar idea for members?

    Whilst I have you attention – can I use your share it plugin and incoperate it into a upcoming social plugin I will be releasing?

    You can technically use the External blogs plugin now. I do on a site I run. You just use this for the feed: http://api.twitter.com/1/statuses/user_timeline.rss?screen_name={USERNAME}


    modemlooper
    Moderator

    @modemlooper

    True, but I’m making it more apparent what are tweets and what are blog feeds.

    CJ, I’m updating bp share it as a jetpack add on, so it wouldn’t be a good idea to duplicate the plugin.


    CJ Kruger
    Participant

    @cj-kruger

    @dt10111 do you not have problems with twitters rate limit? How many users would you say are using the feature?


    modemlooper
    Moderator

    @modemlooper

    CJ, the blogs plugin adds tweets to the database and only gets new ones every 30 min so rate limit doesn’t really get reached.


    CJ Kruger
    Participant

    @cj-kruger

    Thanks modemlooper and dt10111.

    Ye the plugin works great! really awesome.

    For anyone else looking for a the a similar solution – External Blogs Plugin


    modemlooper
    Moderator

    @modemlooper

    PressCrew’s external blog plugin is for Users, the older plugin is for group rss feeds.

    https://wordpress.org/extend/plugins/external-group-blogs/


    RobFenech
    Participant

    @terydinho

    Hi all, thanks so much for the great feedback, I now have this pretty much working as i’d like via the external blogs plugin, which is fantastic.

    A question I have, is would it then be possible to grab the user’s twitter avatar and replicate it on my activity stream? It will just help me to avoid having 100s of mystery men avatars everywhere.

    Thanks


    modemlooper
    Moderator

    @modemlooper

    Activity items must have a user ID attached and then BP does a little code magic to get the image url. Not an easy way to get the avatar on the fly.


    RobFenech
    Participant

    @terydinho

    Thanks Modemlooper – I found a sneaky little way using some jquery.

    if anyone is interested

    `$(‘li.external_blogs > div > div.activity-header > p > a:nth-child(2)’).each(function(index) {

    var TWTName = $(this).attr(“href”);

    var TWTUser = TWTName.replace(‘http://twitter.com/’, ‘http://twitter.com/api/users/profile_image?screen_name= ‘);

    $(this).parent().parent().parent().parent().children(‘div.activity-avatar’).children(‘a’).attr(‘href’, TWTName);

    $(this).parent().parent().parent().parent().children(‘div.activity-avatar’).children(‘a’).children(‘img’).attr(‘src’, TWTUser);

    });`

    May not be the most elegant method, but it works :)


    modemlooper
    Moderator

    @modemlooper

    Ahh JavaScript that magical thing. Make sure you add this code to footer so it won’t slow your page loads.


    RobFenech
    Participant

    @terydinho

    Indeed I have modem, thanks buddy :)

    The good thing is, that until this JS loads, they just see mystery man.

    Thanks again to everyone in the thread who has helped me to get what I wanted to do, done so easily.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Import Twitter Feed (not buddystream)’ is closed to new replies.
Skip to toolbar