Revised (clarified question)
I spent several days trying to figure out how to clear certain information from playing facebook; however, I ran into a brick wall after a brick wall. As far as I can tell, the main problem is the following. I can use the Chrome validation tool to manually find the html I need - it appears inside the iframe. However, when I try to clear this iframe, it is empty (except for properties):
<iframe id="game_frame" name="game_frame" src="" scrolling="no" ...></iframe>
This is the same result that I see if I use browsers' Page Viewer. I do not understand why I do not see the data in the iframe. The answer is NOT that it is added subsequently by AJAX. (I know that both due to the fact that "View page source" can read data that was added by Ajax, and also because I b / c I waited until I saw the data page before clearing it, and it still does not exist).
Is this due to scripting on the facebook screen, and if so? Or I just missed something. I program in ruby, and I tried nokogiri, then mechanized, then capybara without success.
I donβt know if any value matters, but it seems to me that the iframe gets the data using the iframe link "game_frame", which apparently refers to this part of the html that appears earlier in the document:
<form id="hidden_login_form_1331840407" action="" method="POST" target="game_frame"> <input type="hidden" name="signed_request" autocomplete="off" value="v6kIAsKTZa..."> ... </form>
Original question
I wrote a ruby ββprogram that uses nokogiri to clear data from an HTML game on facebook. I am currently receiving HTML using the "check element" chrome element, and I save it in a file and parse it from there. However, I would really like to have access to information from the ruby. For example, I would give the program the page name "www.gamename.com/...?id=12345" and it will start on facebook, go to this page and clear the data. Currently, if I try to do this, this does not work, because I am redirected to the facebook login page. How can I go past the login screen to access the pages I need?
I would like to do this using the nokogiri code I already wrote; however, if I have to rewrite it using something else. Currently, the program is a separate program, not a rails program, but I can change that. I see some information that could point me towards Omniauth, but I'm not sure that what I'm looking for, and that also looks very complicated. I hope there will be a simpler solution.
thanks