Facebook "share" button {SOLVED}

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
8 posts Page 1 of 1
Contributors
User avatar
lesan101
Top Poster
Top Poster
Posts: 193
Joined: Tue Jun 29, 2010 8:10 am

Facebook "share" button {SOLVED}
lesan101
okay wen you write something on ur "whats on your mind" textbox on facebook. the share button appears

idk how to make it click on visual basic : (

i have tried..


WebBrowser1.Document.GetElementById("submit").InvokeMember("click")
WebBrowser1.Document.GetElementById("share").InvokeMember("click")
WebBrowser1.Document.GetElementById("status").InvokeMember("click")

but none of them work.. does any one know?
Last edited by lesan101 on Sat Nov 13, 2010 6:58 pm, edited 1 time in total.
Image
User avatar
Bogoh67
VIP - Site Partner
VIP - Site Partner
Posts: 656
Joined: Sun Apr 18, 2010 8:20 pm

Re: Facebook "share" button help
Bogoh67
wait what is the problem does the click not work or the getelementbyid?
User avatar
lesan101
Top Poster
Top Poster
Posts: 193
Joined: Tue Jun 29, 2010 8:10 am

Re: Facebook "share" button help
lesan101
Bogoh67 wrote:
wait what is the problem does the click not work or the getelementbyid?
YEAH. it highlights that whole line.. so. something has to be wrong/
Image
User avatar
MrBrockWalker
VIP - Donator
VIP - Donator
Posts: 171
Joined: Mon Jul 05, 2010 10:30 am

I tried making a program do this back in the day, I had no luck though... If you find out I'd like to see how you did it cooll;
Visit BW Photography and check out my photos!
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: Facebook "share" button help
MrAksel
Do you get the right element?
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
lesan101
Top Poster
Top Poster
Posts: 193
Joined: Tue Jun 29, 2010 8:10 am

Re: Facebook "share" button help
lesan101
MrAksel wrote:
Do you get the right element?
thats what im guessing is wrong? idk what would go there. i looked at the source carefully.
Image
User avatar
lesan101
Top Poster
Top Poster
Posts: 193
Joined: Tue Jun 29, 2010 8:10 am

Re: Facebook "share" button help
lesan101
you can close this.

MrBrockWalker i found the right solution for the share button...

try this:



Dim Facebookshare As HtmlElementCollection = WebBrowser1.Document.All
For Each lesanElement As HtmlElement In Facebookshare
If lesanElement.GetAttribute("value") = "Share" Then
lesanElement.InvokeMember("click")
End If
Next
Image
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

Re: Facebook "share" button help
Agust1337
Hello MrBrockWalkers,
If you want to be sure or any of you people want to be sure what the name of the controls on a website just look in the source.
Top-notch casual Dating
8 posts Page 1 of 1
Return to “Tutorial Requests”