开发者

Rails and Facebook connect API (graph).

开发者 https://www.devze.com 2023-01-20 10:05 出处:网络
I am developing in Rails 3 and I need to use the Facebook connect API (Graph). I am currently trying out the Javascript SDK and 开发者_开发技巧it works fine. The problem is I do not know how to \"save

I am developing in Rails 3 and I need to use the Facebook connect API (Graph). I am currently trying out the Javascript SDK and 开发者_开发技巧it works fine. The problem is I do not know how to "save" and interact with the information I extract in Rails.

The best thing would be to use some "native" Rails plugin for Facebook. I have looked a bit on the Facebooker Plugin but I do not know how to get started and use it.

Does anyone know how to interact with the Facebook API with Rails 3?


You would need to integrate some kind of server-side logic. For instance, you could use your own JS to call FB's JS and then AJAX submit the data received back from FB to your server for persistence.

Then, you could use something like koala to make server side calls later to the OpenGraph API.


Facebook Graph API is HTTP based, so it works with any language that has an HTTP library, such as cURL, urllib. Just call appropriate url with appropriate data and you will get you data as JSON object.You can use facebook explorer tool for sandbox testing of your api. For rails koala gem just makes it easy to call API and extract info from response.

0

精彩评论

暂无评论...
验证码 换一张
取 消