iOS版:添加Facebook的Like按钮,以原生iPhone应用程序 [英] iOS: Adding a Facebook Like button to a native iPhone app

查看:165
本文介绍了iOS版:添加Facebook的Like按钮,以原生iPhone应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能到Facebook的Like按钮添加到原生iPhone应用程序。在应用中,用户浏览企业目录或交易。当他们敲击一个项目以查看详细信息,这将是很好有一个Facebook的Like按钮,可用于将项目发布到用户的Facebook页面。

I would like to know whether it is possible to add a Facebook Like button to a native iPhone app. In the app, the user browses a business directory or deals. When they tap on an item to view the details, it would be nice to have a Facebook Like button that can be used to post the item to the user's Facebook page.

Facebook上写道:目前,Like按钮仅在移动Web应用程序提供

Facebook writes: "Currently, the Like button is only available in mobile web apps".

我的应用程序是一个本地的应用程序,而不是一个Web应用程序,所以因此我认为这是不可能的。不过,我不认为它有可能与Web组件一起在屏幕上混合原生UI组件,因此有可能实现的Like按钮,虽然我不知道你是如何从本地部分网络部分传递数据

My app is a native app and not a web app, so therefore I assume it's not possible. However, I do assume that it is possible to mix native UI components on a screen along with web components and therefore it might be possible to implement the Like button, although I am not sure how you pass data from the native portion to the web portion.

如果唯一的解决方案是一个黑客,那么我不会实现它,因为在某些时候的技巧将Facebook时会改变他们的API失败。

If the only solution is a hack, then I won't implement it because at some point the hack will fail when Facebook alters their API.

推荐答案

阅读周围那么一点点,你会得到很多线索。这里有一个:
像iOS的应用程序按钮

read around SO a little, you get many leads. Here's one: Like button in iOS application

和评论指向 github.com/brow/FacebookLikeView

它具有相同的警告,但似乎没有任何神奇的解决方案。

It has same caveats, but it seems there aren't any magic solutions.

有这些相关博客文章,以及:

There are these blogposts as well:

<一个href=\"http://angelolloqui.blogspot.com/2010/11/facebook-like-button-on-ios.html\">http://angelolloqui.blogspot.com/2010/11/facebook-like-button-on-ios.html

<一个href=\"http://petersteinberger.com/2010/06/add-facebook-like-button-with-facebook-connect-iphone-sdk/\">http://petersteinberger.com/2010/06/add-facebook-like-button-with-facebook-connect-iphone-sdk/

但不知道你会得到一个原生的UIButton。也许你可以在后台打开一个网页视图并在其上模拟点击...

But not sure you get a native UIButton. Maybe you can open a webview in the background and emulate a click on it...

GL,更新,如果你有一些发现,
俄德。

GL, update if you have some findings, Oded.

这篇关于iOS版:添加Facebook的Like按钮,以原生iPhone应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆