views:

35

answers:

1

I have just seen the buttons on StackExchange sites for Facebook and Twitter status updates. I was wondering how SE is implementing this?

I found this excellent post http://amirrajan.net/Blog/asp-mvc-and-facebook-single-sign-on that shows how to sign in and out of facebook in MVC.

But SE didn't even ask me to sign in, I was logged into FB and it got that. I assume it does the same with Twitter.

Also I don't know if it is a design thing or standard but the popup boxes are really nice, is this something that FB and Twitter provide?

Thanks

A: 

After looking around it was actually simple, just a link, here's an example of how to post status updates to Facebook and Twitter:

<a href="http://www.facebook.com/connect/prompt_feed.php?&amp;message=Stackoverflow%20is%20Awesome%20from%20http://www.stackoverflow.com" target=_blank onclick="window.open(this.href, this.target,'height=500px,width=400px'); return false">Share on Facebook</a>

<a href="http://twitter.com/home?status=Stackoverflow is Awesome" target=_blank onclick="window.open(this.href, this.target,'height=400px,width=500px'); return false">Tweet about us</a>
dean nolan