Facebook Like button in Android Application

后端 未结 6 1368
执笔经年
执笔经年 2020-12-14 12:35

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://w         


        
6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-14 13:40

    Try this one i made some modification

    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.webview);
                        webView.loadUrl(url);
                         webView.setWebViewClient(new WebViewClient());
                     class LikeWebviewClient  extends WebViewClient
                        {
                            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                                view.loadUrl(url);
                                return true;
                            }
                        }
    

提交回复
热议问题