开发者

How to use Ruby Mechanize to automatically like Facebook posts

开发者 https://www.devze.com 2022-12-21 18:57 出处:网络
I\'m trying create a bot which automatically \"likes\" Facebook posts. Using Mechanize I can log into faceboo开发者_开发知识库k, but unforunately the links to the like button are not understood by Mec

I'm trying create a bot which automatically "likes" Facebook posts. Using Mechanize I can log into faceboo开发者_开发知识库k, but unforunately the links to the like button are not understood by Mechanize - they seem to be obsfuscated by JS. The only links I see are the basics such as:

 <Mechanize::Page::Link
 "Edit friends"
 "http://www.facebook.com/friends/?ref=tn">
 <Mechanize::Page::Link "Developers" "http://developers.facebook.com/?ref=pf">
 <Mechanize::Page::Link "Careers" "/careers/?ref=pf">
 <Mechanize::Page::Link "Terms" "/terms.php?ref=pf">
 <Mechanize::Page::Link "Find friends" "/find-friends/?ref=pf">
 <Mechanize::Page::Link "Privacy" "/policy.php?ref=pf">
 <Mechanize::Page::Link "Mobile" "/mobile?ref=pf">
 <Mechanize::Page::Link "Help Centre" "/help/?ref=pf">

Anyone have any idea how I could get Mechanize to see the "like" links?

Thanks


Why not try hitting the mobile version of the site. http://m.facebook.com. It looks like the Like links aren't using any JS there.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号