Simple facebook user feed on rails site - ruby-on-rails

I've searched through a lot of posts and haven't found exactly what I was looking for. Just curious if there was a relatively simple way to post the status updates of one business page to a rails site.
I don't need it to do anything fancy, just list the last several statuses from a single profile.
Is there a gem for that?
Thanks.

Related

How to fetch and display data from some other ecommerce sites to my website?

I want to get products related data from other ecommerce sites to my website.
its just process like giving specific product url from other ecommerce site to display
that product info in my website.
I am looking for this solution in Ruby On Rails.
Is there any solution with ror ? Please share your ideas If you knew about it.
Thanks in advance.
There are two ways of achieving what you need:
1) Those sites might actually have an API which you can use to get your job done.
2) Scraping those sites. Now, some websites for obvious reasons prohibit such thing so do read their terms. At any rate there are a couple of things you can use for web scraping like Nokogiri. A good screencast to get you started can be found on Railscasts
There are a plethora of options for web scraping, depending what you actually need but get started with Nokogiri and you can then find out more eg Mechanize, a library used for automating interactions with a website. Another screenshot that can be found on Railscasts

Cucumber first scenario for blog

So for cucumber, I have a blank application. I'm thinking about for my first BDD it should be:
Feature: Blog
As an Owner
In order to retain customers
I want to create a blog
Scenario: Add blog posts
Given I am logged in as owner
When I go to the blog
And I create a post
Then it should appear on the blog page
I feel like this isn't right. I feel like the first scenario is the hardest, because after that adding a feature should be easier.
So what should the first scenario/Feature be?
If you think of the blog application in terms of the capabilities it delivers, here's what you're currently addressing:
Logging in
Writing blog posts
Reading blog posts
That's a lot to deliver for just one scenario.
If this is just standard blogging software, then you could always start with the purpose of the software - presumably to attract users to your site. What if you just wrote posts by hacking the database with SQL? What if you didn't have any login? What if all you did was display blog posts?
Now you can start with a very much simpler scenario:
Given my most recent blog post is titled "Unicorns are real"
When Ursula the unicorn collector sees my blog
Then the post should be visible on the first page.
Try to make it specific, rather than generic, as this will help you remember what you've already delivered as well as helping your imagination to come up with other scenarios.
The benefit of starting with this post is that you'll only record the things in the database that are actually needed to display a post (and you may decide to use a filesystem instead of a database, etc.)
After that, publishing posts and then logging in to do it will be much easier still.
If you're intending to display adverts, and link keywords to them, etc., then the purpose of your site is to make money, and I would write a scenario around that before you even worry about users coming to read the posts.
This is the advice I give if there's nothing unusual about your blog. However, if you're doing anything differently to the standard blogging software out there, I recommend focusing on that first, as it's where all the risk will be.

simple forms website on RoR- let the user go to a customized link which he can share that shows what he just inputted

I'm a pretty big RoR novice but I've had a lot of problems with finding out even where to begin.
I'm looking for any tutorials or examples of apps that lets a user fill out a simple form in ruby, takes that information, redirects to another page, and posts the information. The user would be able to share that unique link with others, which shows that information.
I've taken a look at various gems such as Formtastic and Simpleforms but the tutorials on Railscast are outdated and it's difficult to get working. I believe it's because I'm on Rails 3.
I'm pretty lost here and if anything can just prod me in the general direction of where to start / give me general strategy of how I should tackle this, it'd be greatly appreciated. This seems incredibly easy but I'm making it harder for myself than what it is.
I'm actually looking to take an intensive RoR course in a few weeks but I need to get this simple MVP app done (it'll include video by nimbb API) for a deadline... so while I should definitely be putting in the effort to learn rather than cheat and drift, your help this time around would really be great :)
To a large extent this functionally is baked into rails. The simplest way to do this is without any extra gems (besides the default ones):
In your terminal run:
rails g scaffold form name:string message:text
Then the user can go to example.com/forms/new and enter their info. Once they submit the form rails auto redirects them to the view page for that new data. The URL of that page which will be something like /forms/n where n is some integer is the link to share.
If your struggling with rails concepts I would look at the rails guides, especially: http://guides.rubyonrails.org/getting_started.html

good backadmin gem for a cms

What Im looking is a good background gem for a cms made in Ruby on Rails.
The workflow I had in mind is this.
All articles are divided into categories. So when the user has no made any categories the user cannot enter any articles.
So I need a section for making, updating, deleting categories.
Then I need a way a user chooses a category and then the user can enter a article which will be a part of that category.
Does anyone know a gem which can provide this.
I have tried activeadmin but it looks it cannot do the job,
Roelof
https://www.ruby-toolbox.com/categories/rails_admin_interfaces would be a great place to start looking.
ps. ActiveAdmin probably can do the job, but without seeing the code you've got, we can't help you fix it.
It sounds like you want a blogging app
This one http://fdv.github.com/typo/ seems good. They have a demo, so you can test run it.
refinery Is more like a cms, but there is a demo, so it take 10 secounds to see if it is what you want

Rails and Facebook - can I do this?

I am considering implementing a Facebook-integration to my web app. I want to be able to import friends names, their ages and their interests/likes.
A. First off, is this possible? Can I access this information?
This import will, more or less, be a one-time import.
I also want to be able to use Facebook-login and to use it parallell to my "normal" login (auth) functionality. I assume this should be quite straightforward since most websites have it this way (e.g. Fiverr.com).
B. These two things being my basic needs of my Facebook-integration, which gem would you recommend me to use?
C. I am 1 1/2 years into RoR and consider myself decent at Rails-programming but hardly know any JavaScript and very little jQuery. Will this integration be very difficult for me, you think?
Receommendations of useful blog posts etc will also be appreciated!
A. Check facebook doc on permissions. I'd say you can get a user friends list (id and names), but nothing more : the friends would have to allow your app in order for you to retrieve their data. I've stumbled upon this issue a few weeks ago, but we were retrieving albums and pictures. The data you want is less sensitive, so maybe you can do it anyway. Bottom line : check.
B. I'd suggest using devise for managing everything related to authentication. It is a well known gem, used by many and more. You can add support for facebook via omniauth; there's a wiki page on devise about how to achieve this.
C. Once you get your grasp around the OAuth concepts, you'll be good. You can use facebook connect without javascript/jQuery. Some features though, as the "like button", will require to use the js SDK. Besides these ones, you can do pretty much everything server-side. For more advanced queries, the koala gem can do that.
Hope this is enough for you.

Resources