Can i read an url site in ruby?

For general discussion related FlowStone
Post Reply
User avatar
Freddymusic
Posts: 30
Joined: Mon Apr 16, 2007 4:57 pm
Contact:

Can i read an url site in ruby?

Post 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.
freddymusic.hu
User avatar
CoreStylerz
Posts: 327
Joined: Sun Jan 22, 2012 2:19 am
Location: italy
Contact:

Re: Can i read an url site in ruby?

Post 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?
Need my support for app development, website or custom scripts?
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
User avatar
Freddymusic
Posts: 30
Joined: Mon Apr 16, 2007 4:57 pm
Contact:

Re: Can i read an url site in ruby?

Post 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
freddymusic.hu
User avatar
CoreStylerz
Posts: 327
Joined: Sun Jan 22, 2012 2:19 am
Location: italy
Contact:

Re: Can i read an url site in ruby?

Post 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.
Need my support for app development, website or custom scripts?
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
User avatar
Freddymusic
Posts: 30
Joined: Mon Apr 16, 2007 4:57 pm
Contact:

Re: Can i read an url site in ruby?

Post by Freddymusic »

Thank you this info, it's not an important problem, i just played with this idea. :)
freddymusic.hu
Post Reply