Facebook在Android应用程序中的按钮 [英] Facebook Like button in Android Application

查看:104
本文介绍了Facebook在Android应用程序中的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的Android应用程序中显示像按钮。以下是我用于在我的Android应用程序中显示Like按钮的代码。

  String url =http://www.facebook.com/plugins/like.php?layout=standard&show_faces= $&$ width = 80& height = 50& action = like& .id.webView1); 
webview.loadUrl(url);
webview.setWebViewClient(new LikeWebviewClient());

public class LikeWebviewClient extends WebViewClient {
public boolean shouldOverrideUrlLoading(WebView view,String url){
view.loadUrl(url);
返回true;
}
}

但是当我运行这个应用程序时会显示一个白色区域。如何解决这个问题?

解决方案

Facebook SDK尚未提供按钮功能(截至2011年10月17日)。它可以在移动Web应用程序。
有关更多信息,您可以查看以下链接:

手机 - Facebook开发者

Like Button - Facebook Developers


I want to display like button in my android application. Below is the code I use to display a Like button in my android application.

String url = "http://www.facebook.com/plugins/like.php?layout=standard&show_faces=true&width=80&height=50&action=like&colorscheme=light&href=http://beta.demo.dy/web/service/304.htm"
webview = (WebView) findViewById(R.id.webView1);
webview.loadUrl(url);
webview.setWebViewClient(new LikeWebviewClient());

public class LikeWebviewClient  extends WebViewClient {
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);
        return true;
    }
}

But when I run this application it displays a white area. How to resolve this?

解决方案

Facebook SDK hasn't provided like button feature for native mobile apps( As of Oct 17 2011). It is available in Mobile Web apps. For more info you can check out these link:
Mobile - Facebook Developers
Like Button - Facebook Developers

这篇关于Facebook在Android应用程序中的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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