There is code to use Facebooker gem (which uses the old Facebook REST API). Does someone have experience how to convert those code to
using Facebooker2, which uses the new Facebook Graph API?
For example, Facebooker has Facebooker::Session and Facebooker::User and they are both gone in Facebooker2.
I can't find too much docs on the two sets of API.
I've written an article about converting your Facebooker app to Facebooker2. This also means that should change from FBML to iFrame if you haven't already:
http://www.clickonchris.com/2010/11/facebooker-converting-from-fbml-to-iframe/
Related
I've got a Rails app in which I'm building an interface for a user to send a tweet with text, a link, and/or an image. I'm trying to figure out how to handle parsing links into a t.co format and what to do with usernames, but I'm coming up short on any clear explanation of what's required.
I'm using the twitter and omniauth-twitter gems and I've also found the twitter-text gem. What I need to know is, am I required to parse links into a t.co format or do anything to usernames in my app before posting to the API? If so, how can I do that in Ruby/Rails? The documentation for the twitter-text gem, which seems to be the official way to handle this function, is nonexistent.
Thanks!
I am a ruby on rails newbie and like to get some data from the google analytics api with the garb gem.
But I struggle at the very beginning. Does anyone have a little sample app to retrieve some data that I can use as a starting point?
KR, Fabian
you can refer following links for garb
http://geekospace.com/working-with-garb-a-rails-gem-for-google-analytics/
http://viget.com/extend/introducing-garb-access-the-google-analytics-data-export-api-with-ruby
http://www.tweetegy.com/2010/06/using-google-analytics-api-in-a-ruby-on-rails-project/
I would like to apologize first if the question is a total newbie question, but I really am a total newbie on this.
I'm a student and I recently have joined a project that involves studying (mining) tweets. The project head asked me to use the Twitter API to extract tweets. What exactly is Twitter API and how can I use it? What do I need to know to start using it?
Twitter allows you to interact with its data ie tweets & several attributes about tweets using Twitter APIs. You'd need to know a server side scripting language like php, python or ruby to make requests to twitter api and results would be in JSON format that can be easily read by your program.
A good starting point would be reading the official documentation at https://dev.twitter.com/ itself.
Throw you can use and show some functionality in your website
Integrating facebook,twitter and google plus into another web app, so that the posts in that app are posted write away as status in facebook,tweets in twitter and status in google plus.I am developing this using ruby on rails.I searched a lot about this but didn't find anything which would work for me.Can post some links or ideas which would be helpful for this.
For Facebook I must suggest you to use Koala Gem...
For Twitter
Twitter
https://twitter.com/about/resources/buttons
A twitter button can be easily generated here and placed on your web site..Its working great. You can even customize everything in twitter.. Its so user friendly.
For Google plus
Google Plus
I am just working on Google plus..Facing some difficulties as its having so many restrictions.
Still I would Like to Share a link you can follow that..
How to share content from our site to google plus
I hope it will work fine...
I'd suggest to use Koala ( https://github.com/arsduo/koala/wiki ) to interface with Facebook. It's by far the best maintained fb library out there.
Otherwise, you should learn one thing or two about OAuth2:
https://github.com/intridea/oauth2
https://developers.facebook.com/docs/authentication/
https://developers.google.com/accounts/docs/OAuth2
Use https://github.com/sferik/twitter to interact with twitter.
For google, I've found that implementing the XML chat manually is easier than using any existing API wrapper. To convert XML responses into data, you an use a combination of the Response#parsed method of oauth2 gem and Array.wrap of ActiveSupport (there is no way for an XML parser to tell a single node to a possibly repeated node (so an array) that appears just once, avery big drawback of XML in my point of view)
Or you can directly ask google for JSON, so you already have the data correctly structured.
And, as #brendan-benson very correctly says, do only API calls in background workers, never in your normal request/responses cycle.
There are plenty of gems available to access these APIs:
Twitter API Wrapper
Facebook API Wrapper
Google Plus API Wrapper
Since APIs are flaky, it's best to use a queueing system like resque to queue the calls in Post#after_create, and then have a resque worker execute the call asynchronously.
Does anyone know of a good Rails 3 compatible gem or plugin that support the Facebook API (rather Graph API but old REST is ok too)? Mostly for getting profile picture, info, friends and posting on wall.
I am looking for something that seems to be maintained well so I know I can count on it in the future as well.
Koala :- A lightweight, flexible library for Facebook with support for OAuth authentication, the Graph and REST API's, real time updates, and test users.
https://github.com/arsduo/koala
OAuth2
http://intridea.com/2010/4/22/oauth2-gem-just-in-time-for-facebook-graph
http://github.com/intridea/oauth2
I found Mini_fb as quite good one. Try it.
Well written, well maintained (as at time of posting) https://github.com/nov/fb_graph