Sinisterly
How to share on Twitter and Facebook! - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework)
+--- Thread: How to share on Twitter and Facebook! (/Thread-How-to-share-on-Twitter-and-Facebook)



How to share on Twitter and Facebook! - Helroos - 07-04-2013

Hi guys, would you like to add a function to your program that allow you to let the user share it on Facebook or [/code]?

Well, if you don't know how to, this thread is for you!

Both sites allow you to use a simple method to share. you just need to let the user visit this URLs:

Code:
https://www.facebook.com/sharer/sharer.php?u=www.google.com

Code:
https://twitter.com/intent/tweet?&url=www.google.com

Using this url, user will see a sharing window with the url "www.google.com". You can change it with whatever you want!



You can use a WebBrowser in your form to do it:
Code:
Public Sub Form1_load() Handles Form1.Load WebBrowser1.Navigate("https://www.facebook.com/sharer/sharer.php?u=www.google.com") End Sub

Or else his main web browser, doing:
[code]Process.Start("https://www.facebook.com/sharer/sharer.php?u=www.google.com")


RE: How to share on Twitter and Facebook! - Helroos - 07-04-2013

Yes, but this only works for twitter.


RE: How to share on Twitter and Facebook! - ZherkTG - 07-05-2013

Sounds handy. Thanks for the tutorial, I'ma try this out.