Develop a Social Media Website With These 10 Code Techniques
Social media sites have gone mainstream over the past few years, and it’s affected web developers everywhere. With the success of sites like Digg, Twitter, Reddit, Delicious and Friendfeed, many developers have turned to adopting some of the practices of social media into their own sites. In fact, it’s not that hard to build your own social news portal, with the help of a few key coding techniques and libraries.
Here you’ll learn 10 clever coding techniques to help you build killer social media websites for yourself and your clients.
Here are a few “total packages” that you can use to build your own social media site:
- Drigg – A module that converts Drupal into a Digg clone.
- Pligg – A digg clone script, complete with extra modules and themes.
Social Web Content Management System – A fully-featured social media content management system.
We’re going to dissect the most important features of social news sites, and showcase example code and libraries that can help you on your way to developing your own social media website.
1. Activity Stream
Ever since Facebook introduced activity streams to their user profiles, the concept has gone mainstream. It turns out that people are fascinated by their friend’s activities. Really fascinated. Knowing every move that friends make, (without technically being a stalker), adds a lot of engagement and another “sticky” factor, keeping visitors at the site longer.
Joomla has a user feed plugin, and Drupal has an activity stream module that accomplishes this as well.
2. User Authentication and Profiles
Kind of a no-brainer, right? It turns out that there are many different methods for setting up a user management system, and it all depends on your preference. Would you rather use a pre-existing solution, or create your own? What language do you want to build the site in? How many levels of access will your site need? These are a few of many questions that will be asked along the way.
If you’d like a more fine-tuned approach to building your site, you might try a framework like Django (python) or CakePHP (PHP) to build out your authentication system. These frameworks have built-in user authentication, and make it easy to develop the site around the user system.
If you’re wanting to spend less time on authentication, you might try a content management system like Drupal (PHP) to build your site around. Drupal is an excellent CMS to use for building community sites, and has many modules to help you build out other functionality that you might need on your social site. Other content management systems like Joomla and WordPress can also work well for building social sites.
3. Invite a friend
At the heart of every social media site is the desire to become “viral”. One of the best ways to go viral is to have an “invite your friend” script that furrows into your user’s email address book and does at least one of two things:
- It helps you find and link your contacts who are also members of the social media site.
- It invites contacts who aren’t part of the social media site
Essentially all of the major social media sites like Friendfeed, Digg and Twitter have this feature. Having your users promote your product is the most effective form of advertising, and best of all it’s 100% free.
4. Recommendation Engine
Showing recommended and relevant content is an excellent way to increase engagement and activity on the site. Reddit and Digg have excellent examples of recommendation engines, and the Digg blog even gives a snippet as to how big of an impact the addition of their recommendation engine has had on their stats.
- Digging activity is up significantly: the total number of Diggs increased 40% after launch.
- Friend activity/friends added is up 24%.
- Commenting is up 11% since launch.
With stats like that, it’s pretty apparent that a recommendation engine could really help your social site. Many of these content recommendation engines are built on the Slope One Algorithm. Drupal has a Content Recommendation Module, which is also based on the Slope One Algorithm.
If you can create a great recommendation engine for your site, you’ll have higher engagement and more clicks.
5. Private Messaging
Private messaging is another solid feature that a social media site should have. Any way you can increase communication amongst your site’s users, the better. Private messaging is a great way to keep your users coming back to the site. It’s not as intrusive as email (unless you enable email notifications), and it isn’t in real-time like IM. It’s a simple layer of functionality that makes communicating across your site easier.
The great part about the private messaging feature is that it’s already built-in to many CMS scripts. However, many sites don’t even turn on this feature. Take advantage of this (mostly) pre-built functionality and keep your visitors happy and chatting with each other.
6. Status Updates
Twitter has made the status update another mainstream aspect of social media sites. Letting the world know what you’re doing at an exact moment a popular way to add engagement to a site. As most Twitter users will vouch, it’s incredibly addicting.
What’s even better for the developer is that it’s probably quite easy to implement on your system. Status updates (or microblogging) is only a matter of having a limited content type (Twitter limits to 140 characters), and adding comments to it. Facebook’s implementation of status updates allows friends to tack comments onto the statuses.
Laconi.ca is an open source platform for microblogging, and it powers sites like Identi.ca. If you’re using a content management system like Drupal or Joomla, it’s quite easy to make a content type that has a limited number of characters and allows commenting.
7. Multiple Ways of Viewing the Data
In order to increase engagement and clicks on the site, social media sites like Digg allow you to view data in many different ways. For example, on the Digg site you can view:
- New upcoming stories
- Popular upcoming stories
- Popular stories in the last 24 hours
- Popular stories in the last 7 days
- Popular stories in the last 30 days
- Popular stories in the last year
… and many more.
Adding useful navigation that highlights different ways of viewing data like stories and statuses is a superb way to increase the clicks on your social media site. Everyone has different preferences, and allowing people the flexibility to tailor their experience viewing your site is a big incentive to keep them coming back.
8. An API
This is probably the hardest aspect of an advanced social news site. Opening up your site with a public API for developers is a stellar way to increase awareness of your product. Now you’ve got hundreds (maybe thousands!) of different developers creating websites and software that allow to more easily find your site and data. Instead of having to fulfill every request for new features, an API allows anyone to mashup your data and display it however they want.
The only problem with an API is that it takes lots of work by the developer. Aside from the extra programming, there’s documentation, support requests and all sorts of issues that surround having an API. And there’s no really good way to provide a true API without advanced programming. However, there is a new service that just launched today called 3Scale that allows you to quickly and easily create an API for your web service.
9. Voting
At the heart of most social media sites is the ability to vote on content. On sites like Digg and Reddit, your vote determines whether or not the story will be made “popular” and shown on the homepage, or it can prevent the story from being seen by many people. Aside from the psychological aspect of being in control, voting provides lots of engagement factors to the site. If you’re going to vote on one story, odds are you’ll vote on many more. Click, click, click.
There are many great libraries for adding voting to sites for any different platform or language. Drupal has the robust Voting API which allows you to hook voting into many other Drupal modules. Joomla has over 22 voting extensions. A simple search on Google will reveal tons of PHP, ASP and Perl open source scripts for integrating voting into your site.
10. Widgets
What would a social media site be without a widget? Digg derives a hefty chunk of their traffic from voting widgets that people place on their site, in hopes of being submitted or to increase their vote count. Twitter, Friendfeed and Delicious allow you to put JavaScript or Flash widgets that show your latest interactions across these sites. By adding a widget to your social site’s offering, you’re increasing it’s viral factor.
The beauty of most widgets is that they usually derive from a simple piece of JavaScript (or Flash), and could be made using RSS feeds or API calls. Sites like WidgetBox allow anyone to quickly and easily create a widget, if you’re needing inspiration.
The widget is at the core of viral distribution of content in a social media site. Showcasing your best content or user content on blogs across the Internet helps bring traffic and interest from every corner of the Net.
- Subscribe to the NETTUTS RSS Feed for more daily web development tutorials and articles.
Glen Stansberry is a web developer and blogger who’s struggled more times than he’d wish to admit with CSS. You can read more tips on web development at his blog Web Jackalope.
Liked this post? Vote for it on Digg below. Thanks!











awesome tips! thanks mate.
Another nice post, like usual :)
Anyway, you can use Sweetcron for your Activity Stream
This is not something new, but I like it, because sometimes you just can’t remember something and here is the tips that will remember me a main points if I want to do something like this. Thanks :)
This is a nice mini-list here.
Nice tips, thanks for sharing.
Quite Useful actually. Thanks!
ok…. nothing spectacular, buit handy to know.
I like this types of post… plz keep em coming Glen.
Thanks for sharing this great ideas, I love it
Great Tips, thanks!
url to widgetbox is wrong.
Thanks for the post!
Great article! Thanks!
Very clever (marketing) ideas for any new startups. I recommend everyone to follow them.
Hmmm well written but nothing new
I always think about what is need for different sorts of websites. When I look at this tutorial I know what I need to make that sort of website!
thanks!
My basic thoughts for a lifestream site condensed in this article, thanks =)
Thanks SO MUCH for this!!!!!!!!!!!!!!!!!!!!! I’ve been looking for a way to socialize my website! (snedekerdesignz.com)
not bad article, handy when my site starts to grow.
Thanks
Nice solid list… thank you!!!!
Garry G
Editor
TheEnergyRoadmap.com
Uh, hello? Where’s the code? The tutorial? The help-me-do-it? This is just a what-you-could-do-if-you-knew-how.
This just changed my entire thought process for a current project. Awesome list. Thank you!
Has anyone ever heard of elgg??
My understanding is that its an open-source social network platform. I’d love to hear more about it from anyone thats working with it.
http://elgg.org/
I’m working with elgg and finding it a very capable engine on which to build a social network. It isn’t an out of the box solution but nor is it too difficult to learn.
Not in my list of ten favourite nettuts posts, but thanks for writing it nonetheless :)
A very useful post, thanks. :)
Are you serious with this list?
Next you’ll be telling us about “great ways to avoid the rain”
1. wear a raincoat
2. carry umbrella
3. stay inside
4. live in a desert
Or – wait – let me guess your next topic: “how to make a great news site”
1. find some news
2. publish it to a site
3. get fancy with RSS!
get real. perhaps a bit more detailed than a 30-thousand foot description of planet earth (we all know it’s round, and blue, boy genius.)
M,
Your comment was quite entertaining.
Still laughing.
…
Ok, now I’m good.
Um, I do see why you’d be frustrated but it is actually a nice list for someone new to the social site world like myself – a nice thing to point out why facebook is useful and why I like it. Once I actually read the article above it kind of clicked more. Good pointers.
How about using open source CMS like PHPizabi or Dolphin for example?
perfect xD
Thanks
this post feels abit half-done… all valid points, but just not developed at all… just noticed your article on smashing! hasnt gone down too well either :s
Really good startpoint for me.
Thanks.
I can write a roadmap with with these tips.
The most important thing by far is to know your language of choice well. To make a real social site you’re going to need a lot more than the average understanding of WordPress or Drupal. You’re going to need to know how to hack and hack well. That should be #1 on the list.
The Joomla user feed plugin link doesn’t work from the Joomla site.
There are actually multiple links that do not work within the pages you linked to within this article in order to acquire some of these plugins.
“These 10 Code Techniques” … these are some ideas for site features, but they are certainly not code techniques. I found the comments about ‘top ten’ articles annoying in the past – as they are justified in the case of this sites running costs – but I just can’t see any real usefulness in this article.
This is a really great article I enjoyed all of it. Though I agree with Thomas, where’s the “code”? I did like the article, even though it is misnamed.
Thanks for the recommendation engine, was looking for something like this
Oh, i was waiting a lot of code lines. Not something like this :(
I think i will need with M, it would be better if you would write how you do it and else.
Anyways, thanks.
Great tips man. Keep up the good work
this is wonderful tutorial i will put acopy of this lesson on
my site here
http://www.as7ap4you.com
hey i got some link love on the twitter screenshot! that’s wicked thx mate a good read!!
Great tips thanks
can u tell me about social software ? and your opinion about facebook.
thanks,
Excellent and great .
not at all what i was looking for but hey,you introduced me to 3scale networks,i cannot complain.I suggets you include links to where one can get such scripts,if you get the time,especially the one to do with groups i.e
like the one being used here http://lists.peopleaggregator.org
Cheers
this is wonderful topic …. i will put acopy of this topic on
my site here
http://www.as7ap4you.com
I haven’t found anything about the code itself. Just ideas. Very good, though.
Sounds great! Now one you whizes needs to go do it!
great tips! I just launched ” hotgossipnews.com ” so people can post their articles on there :)
Great article, contrary to what others are saying. I think this is a must-read for anyone in the process of building a social media site.
To those looking for a pre-built solution with most of these features built-in, Ning is the major player in this arena, among others.
Here’s a useful link with a bunch of other solutions: http://www.techcrunch.com/wp-content/wlsn_comparison_chart.html