0

I want to use twitter's timeline widget on my site. This is different from the twitter drupal module that imports tweets as drupal content. I need all users of my site to be able to show the timeline widget on their profiles.

Is there a module that can assist with this?

Ive looked at the twitter timeline module but its not ideal. It would require giving users permission to create or edit a blocks. Also you have to enter the widget ID which I think some users will find confusing.

  • 1
    Twitter Timeline should do the trick. It won't do 100% of everything you want out-of-the-box (very few modules do). But that'll serve as a good starting point for your own version of the module. Well, unless it does tick every box straight away, you never know – Clive Nov 13 '13 at 17:33
  • Ive updated my question after looking at that module. – Evanss Nov 13 '13 at 18:47
1

If you want to do this yourself, in broad strokes, you could create a custom module that does the following:

  1. Creates two user profile fields that your users can edit if they want:

    a. Their Twitter User Name

    b. Their Twitter Widget ID

  2. Creates a block that:

    a. Is displayed when a User Profile is displayed and these two fields are filled out that

    b. Takes these two fields from the user profile being displayed and integrates them into the HTML required by Twitter (see https://twitter.com/settings/widgets/new when logged into Twitter), eg, it outputs the twitter code from your previous question (https://drupal.stackexchange.com/questions/94079/allow-users-to-embed-twitter-feeds-without-allowing-script-tags) but fills in the USERNAME and WIDGET_ID with the values of these two fields.

Once again, Twitter is requiring this Widget ID, so whether or not this is confusing to your users is, unfortunately, irrelevant.

  • The twitter module for drupal authenticates directly with twitter.com meaning users dont need to enter the widget ID. So it must be possible for a drupal module to not require the widget ID and still show the timeline module. I have no idea how to do this though so I will probably use your solution. – Evanss Nov 14 '13 at 11:26
  • correct, it authenticates but then puts the task of creating the content on you. if you want to use twitter's pre-made widgets, you do need the id. – Jimajamma Nov 14 '13 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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