简体   繁体   English

将Facebook,twitter,google plus集成到另一个应用程序中

[英]Integrating Facebook,twitter,google plus into another app

将facebook,twitter和google plus集成到另一个Web应用程序中,以便将该应用程序中的帖子写为Facebook中的状态,Twitter中的推文和Google plus中的状态。我正在使用Rails开发ruby。关于此问题,但未找到对我有用的任何东西。可以发布一些对此有帮助的链接或想法。

For Facebook I must suggest you to use Koala Gem... 对于Facebook,我必须建议您使用考拉宝石...

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. 对于Twitter Twitter https://twitter.com/about/resources/buttons一个Twitter按钮可以在此处轻松生成并放置在您的网站上。 You can even customize everything in twitter.. Its so user friendly. 您甚至可以在Twitter中自定义所有内容。它非常易于使用。

For Google plus Google Plus I am just working on Google plus..Facing some difficulties as its having so many restrictions. 对于Google plus和Google Plus,我只是在研究Google plus。.由于存在很多限制,因此遇到了一些困难。 Still I would Like to Share a link you can follow that.. 我仍然想分享一个链接,您可以按照此链接进行。

How to share content from our site to google plus 如何将内容从我们的网站共享到Google Plus

I hope it will work fine... 我希望它能正常工作...

There are plenty of gems available to access these APIs: 有很多宝石可以访问这些API:

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. 由于API不稳定,因此最好使用resque之类的排队系统在Post#after_create中对调用进行排队,然后让resque worker异步执行该调用。

I'd suggest to use Koala ( https://github.com/arsduo/koala/wiki ) to interface with Facebook. 我建议使用Koala( https://github.com/arsduo/koala/wiki )与Facebook交互。 It's by far the best maintained fb library out there. 这是迄今为止维护最完善的fb库。

Otherwise, you should learn one thing or two about OAuth2: 否则,您应该了解有关OAuth2的一两件事:

Use https://github.com/sferik/twitter to interact with twitter. 使用https://github.com/sferik/twitter与Twitter互动。

For google, I've found that implementing the XML chat manually is easier than using any existing API wrapper. 对于Google,我发现手动实现XML聊天比使用任何现有的API包装器都容易。 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) 要将XML响应转换为数据,请结合使用oauth2 gem的Response#parsed方法和Array.wrap的Array.wrap(XML解析器无法将单个节点告知可能重复的节点(因此,数组)仅出现一次,在我看来,XML的一大缺点是

Or you can directly ask google for JSON, so you already have the data correctly structured. 或者,您可以直接向Google查询JSON,因此您已经具有正确的数据结构。

And, as @brendan-benson very correctly says, do only API calls in background workers, never in your normal request/responses cycle. 而且,正如@ brendan-benson非常正确地说的那样,仅在后台工作程序中执行API调用,而不是在正常的请求/响应周期中执行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过 Twitter、Facebook、LinkedIn 和 Google Plus 共享 - Sharing via Twitter, Facebook, LinkedIn, and Google Plus 集成Twitter Oauth和Facebook Connect以在Rails应用程序上登录 - Integrating Twitter Oauth AND Facebook Connect for login on a rails app 将Twitter Feed集成到Rails 4 App中 - Integrating Twitter Feed in Rails 4 App 在Facebook,Twitter,Google和其他产品上共享自定义图像,网址,内容 - Share custom Image, Url, Content on Facebook, Twitter, Google plus For Different products 将Twitter,Facebook和其他服务集成在一个站点中 - Integrating twitter,facebook and other services in one single site 在集成Google Plus的同时如何在angular js中使用Google Oauth接收refresh_token - How do I receive refresh_token with google Oauth in angular js while integrating Google Plus Rails / Django中的Facebook,Twitter和Google登录示例 - Facebook, Twitter and Google login example in Rails/Django 使用Twitter / Facebook / Google进行Rails用户注册? - Rails user registration using Twitter / Facebook / Google? 将Devise与Twitter集成 - Integrating Devise with Twitter 如何使用Devise Omniauth +(Facebook,Twitter,Google)完成多重身份验证? - How to accomplish multiple authentication using Devise Omniauth + (Facebook , Twitter, Google )?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM