Skip to content

Adding a Twitter Widget to SugarCRM

twitter

So you’d like to add some extra Twitter functionality to SugarCRM, maybe automatically populating the Twitter account details and allowing instant response, retweet or marking an item as a favourite. Here’s how…

 

Screen_Shot_2013-03-12_at_16.25.35.png

Browse to Twitter Widgets at http://www.twitter.com/widgets/

Click on Create new

Configure a user widget

Screen_Shot_2013-03-12_at_16.26.10.png

Twitter auto populates the details as a User timeline widget. I’m leaving these as is, making sure that the domains are correct where I’m hosting the Widget later. Click on Create widget when done.

Generated…

Screen_Shot_2013-03-12_at_16.30.38.png

Twitter generates the HTML code you need. Copy this code.

Paste

Screen_Shot_2013-03-12_at_16.52.30.png

Paste it into your favourite code editor, changing the href as above, and adding <?php echo($_GET["twitterid"]); ?> as above.

Now for some Sugar…

Screen_Shot_2013-03-12_at_16.28.14.png

Log in as an admin to Sugar, click on Admin.

Studio

Screen_Shot_2013-03-12_at_16.29.30.png

Go to Studio, click on Contacts.

Add a field

Screen_Shot_2013-03-12_at_16.29.38.png

Click the Add Field button.

Field

Screen_Shot_2013-03-12_at_16.33.41.png

Choose Iframe as the field type and populate as above. I’ve edited the iframe height to 600 to match the size of the widget and changed the Default Value of the URL to include a parameter ?twitterid={twitterid_c} Twitterid_c contains the Twitter ID of the contact in Sugar.

Layout changes

Screen_Shot_2013-03-12_at_16.34.35.png

Drag and drop the new field Twitter Widget into a separate tab as above. Change the tab title and maximise the field to be 100% as above. Click on Save & Deploy to finalise the changes.

Finally…

Screen_Shot_2013-03-12_at_16.36.35.png

Here’s our widget…

A little extra…

Screen_Shot_2013-03-12_at_16.37.06.png

We can also reply, retweet and mark items as a favourite should we want to…

Leave a Reply

You may use basic HTML in your comments. Your email address will not be published.

Subscribe to this comment feed via RSS