Page 1 of 1

Can i read an url site in ruby?

Posted: Thu Mar 20, 2014 9:25 pm
by Freddymusic
I have a facebook like url button in a simple html site. Can i see this button in ruby if i want to make a like button in a software, or it's not good way? Ruby is totally new for me.

Re: Can i read an url site in ruby?

Posted: Thu Mar 20, 2014 11:11 pm
by CoreStylerz
The ruby componet isn't ruby on rails (Ror) wich is used for website.
Why not pointing your button directly to your Facebook page or in a welcome page you make with the like button?

Re: Can i read an url site in ruby?

Posted: Fri Mar 21, 2014 2:57 pm
by Freddymusic
Yes, it's good for me, just i think'd maybe have a direct solution wihout a second step. I thought about it, maybe i can do that with the httppost module, but i couldn't made it. So if i want a + like it's work only in a browser.
I saw some information with the ruby, but i'm not sure it is good for me.
require 'net/http'
require 'uri'

def open(url)
Net::HTTP.get(URI.parse(url))
end

page_content = open('http://www.google.com')
puts page_content

Re: Can i read an url site in ruby?

Posted: Fri Mar 21, 2014 3:15 pm
by CoreStylerz
Freddymusic wrote:Yes, it's good for me, just i think'd maybe have a direct solution wihout a second step. I thought about it, maybe i can do that with the httppost module, but i couldn't made it. So if i want a + like it's work only in a browser.
I saw some information with the ruby, but i'm not sure it is good for me.
require 'net/http'
require 'uri'

def open(url)
Net::HTTP.get(URI.parse(url))
end

page_content = open('http://www.google.com')
puts page_content


You can't use Ror in standard ruby. Ruby in flowstone is not designer for web apps.
For sure the debug will say that net/http isn't available.

I can make a script on php if you want but as a service.
But I believe you cannot directly add like via http post.
They want you to load their frame.

You can maybe solve this by creating a ruby exe (not in flowstone) that open when you click your fs app button.
In that case you can open an HTML from web as a browser

Here some SDK for interfacing facebook in ruby, c, java and others.https://developers.facebook.com/docs/other-sdks

Gems should work in exe but not in vst under flowstone.

Re: Can i read an url site in ruby?

Posted: Fri Mar 21, 2014 3:47 pm
by Freddymusic
Thank you this info, it's not an important problem, i just played with this idea. :)