문제

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

도움이 되었습니까?

해결책

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?&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>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top