在Android和iPhone整合Facebook与像按钮 [英] integrate facebook with like button in android and iphone

查看:155
本文介绍了在Android和iPhone整合Facebook与像按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Android和iPhone整合Facebook与像按钮。我在Android和iPhone整合Facebook的也是,但我并没有像集成按钮。所以,请告诉我如何Facebook的整合像Android的按钮,以及在iPhone上。

I want to integrate facebook with like button in android and iphone. I integrated facebook in android and iphone also but i didn't integrate like button . So please tell me how to integrate the facebook like button in android and also in iphone.

有关整合,我用下面的链接比如在Android的Facebook的

For integrate the facebook i used below link example in android

<一个href="https://github.com/facebook/facebook-android-sdk">https://github.com/facebook/facebook-android-sdk

现在我有整合像按钮Facebook的。

Now i have to integrate the facebook like button.

最好的问候。

在此先感谢。

推荐答案

有一个在Facebook的图形API没有像按钮。有一些替代品可以选择。首先,你可以使用web视图,并显示在一个web视图等按钮。

There is no like button in facebook graph api. There are some alternatives that you can select. First you can use a webview and show the like button in a webview.

https://developers.facebook.com/docs/reference/plugins/like /

另一种方法是使用Facebook的Andr​​oid的SDK Facebook分享功能。

Another alternative is using facebook share functionality in facebook-android-sdk.

最后,更全面的方法是使用一个意图,并让用户选择如何分享它。 (它可以是任何应用程序,包括Facebook)

Last and more general alternative is using an intent and let the user select how to share it. (it can be any app including facebook)

Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "YOUR SUBJECT HERE!");
shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, "YOUR TEXT HERE");
startActivity(Intent.createChooser(shareIntent, "YOUR TITLE HERE"));

这篇关于在Android和iPhone整合Facebook与像按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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