Sign in to follow this  
Followers 0
Hasher

Facebook comments field

1 post in this topic

Hi Guys

Trying to grab a url from comments field in facebook but its proving difficult . Basically i am trying to get url's from a news feed .The part where people either leave comments or click the like button . To read these comments you have to click on the 'View all comments' link to expand the selection. I tried mofidying a script that has worked in the past but something on facebook stops me from grab url's . I got around the 'View all comments' link by specifying the direct link. Could some give me some hints on where I am going wrong . Below is a snippet of my code.

Hopefully my code will make what i am trying to do more clearer

cheers paul :-)

;#NoTrayIcon 
#include <IE.au3>
#include <Array.au3>
Dim $avArray[1]
;TODO: log errors?

    $baseurl = "http://www.facebook.com/pages/Shitload-is-a-Standardized-Unit-of-Measurement/271662258068?v=feed&story_fbid=319748985317"  
    $oIE = _IECreate ($baseurl,0,1)  ;Create an instance of IE in a hidden window
    $oLinks = _IELinkGetCollection ($oIE) ; Get links off Website


For $oLink In $oLinks
    if StringInStr($oLink.href,"facebook.com") = True then ;
        ;if StringInStr($oLink.href,"javascript") = false Then ; remove any with javascript
        _ArrayAdd($avArray,$oLink.href) ; Add link to array also redims the array
        ;_ArrayDisplay($avArray,"Test") ; for debugging purposes
    EndIf
Next

Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0