Facebook help! Please!

chink12

  • Joined: Mar 9, 2011
  • Posts: 45

Mon 6/18/2012 - 18:00

OK i'm trying to make something that will suggest friends on facebook. I have everything set up until i get to a window that looks like this:

 

Now this is the suggest page. How can i select the different people in the list using the web options. Since Everything will be done in a minimized internet explorer browser. Help please anyone

#1

chink12

  • Joined: Mar 9, 2011
  • Posts: 45

Tue 6/19/2012 - 9:47

+additional info+

 

here is an image 

http://www.freeimagehosting.net/zvr19

 

This is what i have so far. This selects the first few friends. But you see the css is not the same. each friend has a unique element code. Two numbers increase as we start selecting friends left to right then down 1 row left to right again. It is fairly straight forward, but i'm not getting it to work. I'm trying to set up a loop. I'm setting a variable adding it to a list and replacing text. It's a little complicated for me and i just not getting it to work. Any help and or sample code would be lovely. Much appreciate any help from anyone. thank you.

 

So far here is what I got. it sets the css code for the first friend as a variable. Then it loops. and the top of the loop it is supposed to add +1 to the css code in two places. so as it loops the elements are being changed by replace text so it will select the next friend.

 

Thanks all

#2

chink12

  • Joined: Mar 9, 2011
  • Posts: 45

Tue 6/19/2012 - 13:10

Getting closer! OK well maybe not so close. But I figured out that I cannot use a wildcard to repace text. So how do i replace text then? I set it so there is a temporary file that I can read from. But there are two numbers inside the css element that I need to change. I want it to follow the loop count. So if the loop is on loop 500 I want it to be set for 500. For example my css element is:

 

(0)css(1)html(5)css(1)vb(4)wa(0)blah(1)www(0)css(1)(5) I want to change the 5's according to what loop is in the index. so if it is on index 6 then the css element should be like this:

(0)css(1)html(6)css(1)vb(4)wa(0)blah(1)www(0)css(1)(6)

 

There is a lot more css code in there but that is just basically what im after. I need it to change every time it loops since it will be selecting different css elements that are aligned.

 

Well getting sorta closer. Hope Samantha can come save me again.

#3

chink12

  • Joined: Mar 9, 2011
  • Posts: 45

Tue 6/19/2012 - 14:46

*UPDATE* Sorry for so many updates. I figured out the looping system now. The problem I'm having now is sometimes facebook doesn't load the buttons exactly the same way each time. I guess its using javascript when you click on buttons. Is there anyways to load that and make the button open. I guess you would call this "java script drop down lists" ? Not sure. I cant seem to get it to "click on web page" everytime because the css element may differ onces in a while. Here is a pic:

http://www.freeimagehosting.net/42eqx

 

After clicking that gear it drops down and i select another button that says "suggest friends"

 

This is what i get when inspecing with firebug

 

<div class="wrap">
<a class="fbTimelineActionSelectorButton uiSelectorButton uiButton uiButtonOverlay uiButtonLarge uiButtonNoText" href="#" role="button" aria-label="Other actions" aria-haspopup="1" rel="toggle" wotsearchprocessed="true">
<i class="mrs img sp_4i4ayo sx_de1d6a"/>
<span class="uiButtonText"/>
</a> this is what i get when i inspect with firebug i get something totally different when i use the automated way of getting the "css element"  

#4

Samantha

  • Joined: Apr 23, 2010
  • Posts: 2326

Tue 6/19/2012 - 14:51

Hey Chink, 

 

Check the script attached this should do the trick. You will also need a text file that will hold the full name of each friend you want to suggest to the friend you have.

 

Samantha

20120619.1749_(Sample_Script)_Suggest_Friends_on_Facebook_[4_.0_.1_.1454]_.waj

#5

chink12

  • Joined: Mar 9, 2011
  • Posts: 45

Tue 6/19/2012 - 15:10

Hmm. That is a very effecient way of doing it! Is there an easy way you would think that I can collect all the names of the friends i have on 1 account. Otherwise it would be 4,000 friends i would need to manually input. By the way here is what i have (VERY chopped up nasty code i have attached sorry) 

 

Downloading the new version also

 

-edit-

Beautiful code Samantha! 20lines and it looks gr8! Thank you so much! I would really like to figure out a way of getting the list of friends. "Trying it now"

 

Thank you!

friend_inviter.waj

#6

Samantha

  • Joined: Apr 23, 2010
  • Posts: 2326

Tue 6/19/2012 - 15:25

You would need to use the extract data from web, and extract all friends you have in list.

 

Samantha

#7
Not a member yet? Register

Copyright 2013 - Softomotive Ltd