I cant get to authenticate using Soundcloud account - ruby-on-rails

Im programming an app that has to be able to allow the users to sign up using their soundcloud accounts, so far I haven't found any usefull tutorial using Omniauth, Can anyone help me giving some tips to start with?

I gave a presentation to my local meetup about integrating OmniAuth into your application using a demo application here. You can fork it and go through the steps in section 3 of the README. There are also some slides you can look at here.
There's a lot of refactoring that needs to still be done, but it was designed to be a basic intro start to a bunch of people who had never used OmniAuth before.
I also list resources that helped with putting together the presentation. I highly recommend checking them out.
Although the examples are not with the omniauth-soundcloud, it should work similarly.

Related

Integrating a Discourse forum with a Devise rails app

So I'm looking to integrate a Discourse forum with the same authentication as the main app (Devise). It would be mainapp.com and forum.mainapp.com. A lot like codeschool and hummingbird has going.
I saw another SO Question that was asked a year ago and wondering if there have been any improvments/ideas on doing this.
A user would sign up at mainapp.com and be automatically signed in to forum.mainapp.com using their devise user details to fill discourse user fields.
As a fairly new ruby/rails developer It's a bit hard wrapping my head around what to do, although I suspect it starts at carrying a session cookie over from mainapp.com to forum.mainapp.com.
Wondering if this has become easier to do over the past year and if anyone can steer me in the right direction for implementing this.
Discourse now supports Single Sign On to integrate Discourse users with the main website now. Official documentation here:
https://meta.discourse.org/t/official-single-sign-on-for-discourse/13045

integrating a discourse message board with an existing rails site

I'm looking at integrating a message board for a site I'm developing in rails. The new discourse board looks interesting http://www.discourse.org/ but there isn't much information about integrating into another site either via oauth2 or sso or perhaps using a rails engine type system. Has anyone succesfully set this up with an app like this?
thx
edit t
Is there a roadmap for how this integration could take place in the future? Parts of it look really intriguing but would like some more info on how this use case could be handled.
edit 2
Since this question is getting a fair amout of traffic, I want to add this post http://meta.discourse.org/t/integrating-discourse-with-current-user-database/6669 which goes over the SSO attempts going on at discourse currently. I have also been in contact with the people at thougtbot about their implementation.
I was interested in the same issue but here's what I found on Github issues:
The easiest way to get it running would be to install Discourse
outside of your app. We do offer the full source code if you want to
integrate with your existing login system, but I imagine it would be a
fair amount of work at this point.
Right now we haven't focused much on production deployments since
we're pre-beta and want to make sure people have a super easy upgrade
system in place to stay on top of security holes.
Not done any app with Discourse, but if their site does not provide a lot of info did you browse the Git Repository https://github.com/discourse/discourse it provides plenty of information and resources links like these ones :
Discourse Developer Install Guide (Vagrant) :
https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md
Developer Advanced :
https://github.com/discourse/discourse/blob/master/docs/DEVELOPER-ADVANCED.md
Admin quick Start : https://github.com/discourse/discourse/wiki/The-Discourse-Admin-Quick-Start-Guide
Hope it can be of some help for you
Cheers

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.

Facebook Canvas App on Rails 3.1

I'm trying to create a Facebook canvas app that allow users to write a custom Wall post and tag some friends. I'm familiar with stand alone rails apps, but I'm having a hard time grasping API interactions.
I've came across with a few gems (Facebooker2, Koala and fb_graph) and the Heroku integration that provide a easier way to use the GraphAPI, but I wasn't able to find updated examples on how to integrate them with a rails app from scratch. So far, the only one that I've found was this sample from fb_graph.
It seems that this type of application is pretty common of Facebook, so I was expecting to find more info on the community. Is there a better way to start developing for Facebook using Rails or should I just pick one of those gems and stick with it until I grasp the concepts?
I was able to create an Facebook canvas app using the fb_graph sample. Probably there are better solutions to handle Facebook authorization inside canvas, but the sample is a great start. Here is my project, a Music Quiz inside Facebook: https://github.com/luizbranco/MusicQuiz
I built my first Facebook app from scratch using Koala. Their wiki on Github is absolutely fantastic and everything is well explained.

Best way to get started with Facebook and Ruby on Rails

I'm looking to develop my first Facebook application and therefore looking for some advice on where to get started.
I've spent a few hours browsing Facebook's Developer Wiki, Facebooker library, looking at the sample chapters in "Developing Facebook Applications with Rails" by Pragmatic Programmers, etc.
Since FB is constantly changing their API, and Facebook Connect is newer than the aforementioned book, does anyone have any advice on where to get started?
Create a Facebook app and new Rails app and play around with integrating Connect using Facebooker.
Getting these components to work will help you understand the FB application configuration process, loading the appropriate javascript files, and figuring out how to read the FB session in an Rails app.
Once you have that figured out try creating a normal FB IFrame app.
One of the things that I think is super important is to try to keep your focus pretty narrow when getting started. If you try to tackle learning: ruby, rails, facebook api, facebook gems, web development, html, css all at the same moment you'll probably get burnt out and give up. Holy smokes that's a lot of stuff to learn! The trick you should do is figure out how small chunks until you get it a little, then move onto the next thing. Keep your goals super small.
How I would do it if I were you:
Start by building a new rails application
Then learn how to build a landing page in rails
Then make it look good with html and css
Then learn how to make it better with something like bootstrap (and learn about gems)
From there you could look into calling a simple API from facebook, and the facebooker gem.
Getting started with Ruby on Rails is something that is a little daunting at first, but after you get started it gets a lot easier. After running Ruby on Rails bootcamps for Startup Accelerators, Harvard Business School, in Times Square, Boston, and Pittsburgh, I started http://www.firehoseonline.com. It's a video tutorial to get started, so you should check out that site.
My advice is to learn as much as you can by actually writing the code. Don't get caught up too much in the details and the specifics. If a tutorial gives you some code to write, and some information, and you don't absorb all the information at first, keep going. Afterwards go back to the material, and once you have gone through the whole process of writing your first application a lot of the pieces will fit together.

Resources