简体   繁体   English

从jQTouch / Phonegap iPhone应用程序发布Twitter和Facebook更新

[英]Posting Twitter and Facebook updates from a jQTouch / Phonegap iPhone app

I'm using jQTouch and Phonegap to write a simple iPhone app which i'm planning to release through the App Store. 我正在使用jQTouch和Phonegap编写一个简单的iPhone应用程序,我计划通过App Store发布。

Part of the planned functionality will let the user update their twitter or facebook status with the output of the App (some text, possibly a link). 计划功能的一部分将让用户使用App的输出(一些文本,可能是链接)更新他们的推特或Facebook状态。

Before I go ahead and start rolling my own solution, are there any JS libraries or plugins (or anything else) out there which will make this a lot simpler? 在我开始编写自己的解决方案之前,是否有任何JS库或插件(或其他任何东西)可以使这更简单? Ive tried a few Google searches which havent turned up anything. 我尝试了一些谷歌搜索没有发现任何东西。 The thought of all the authentication / error handling code is a bit daunting. 所有身份验证/错误处理代码的想法都有点令人生畏。

Thanks, 谢谢,

James. 詹姆士。

I endup implementing facebook and twitter login using the ChildBrowser plugin to authenticate as a mobile web site. 我最终使用ChildBrowser插件实现facebook和twitter登录,以作为移动网站进行身份验证。

If this interesting for someone I could write a blog post about it. 如果这对某人有意思,我可以写一篇关于它的博客文章。

http://github.com/purplecabbage/PhoneGap-Plugins/tree/master/ChildBrowser/ http://github.com/purplecabbage/PhoneGap-Plugins/tree/master/ChildBrowser/

Update: I just made the blog post: http://www.pushittolive.com/post/1239874936/facebook-login-on-iphone-phonegap 更新:我刚刚发布了博客文章: http//www.pushittolive.com/post/1239874936/facebook-login-on-iphone-phonegap

Hope it make sense, it explains how to login with facebook. 希望它有意义,它解释了如何登录Facebook。 I could make one about twitter login if someone is interested, but is basically the same. 如果有人感兴趣,我可以制作关于Twitter登录的一个,但基本相同。

Cheers, Sebastian 干杯,塞巴斯蒂安

I have been trying to todo the same thing, the only methods FB provides API's for is native code, or a mobile web site. 我一直试图解决同样的问题,FB提供API的唯一方法是本机代码或移动网站。 There is no in between (PhoneGap). 中间没有(PhoneGap)。 I't appears its not possible besides writing a PhoneGap plugin for Twitter and Facebook (which is moderately difficult) or standing up a web site for your application and forwarding requests from there. 除了为Twitter和Facebook编写PhoneGap插件(这是一个中等难度)或为您的应用程序站起来并从那里转发请求之外,我似乎不可能。

I myself decided to write a PhoneGap plugin using Facebook and Twitter's sample iPhone code. 我自己决定使用Facebook和Twitter的示例iPhone代码编写PhoneGap插件。

I tried using the ChildBrowser with Phonegap/Android, but it didn't work due to API mismatches (the iPhone-version has event handlers for load finished etc, but the Android version doesn't). 我尝试将ChildBrowser与Phonegap / Android一起使用,但由于API不匹配而无效(iPhone版本有加载完成的事件处理程序等,但Android版本没有)。

But I used the Phonegap Facebook plugin to connect and it worked flawlessly. 但我使用Phonegap Facebook插件进行连接,它完美无缺。

I just refer to my earlier blog post which includes a step by step introduction how to connect to facebook inside a Phonegap environment: http://blog.lagentz.com/phonegap/facebook-authentification-inside-phonegap-android/ 我只是参考我之前的博客文章,其中包括一步一步介绍如何在Phonegap环境中连接到Facebook: http ://blog.lagentz.com/phonegap/facebook-authentification-inside-phonegap-android/

Hope this helps, Gregor 希望这有帮助,格雷戈尔

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM