有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java Android Facebook登录和Webview

我正在使用Facebook登录sdk并实现Facebook登录按钮,现在我想在自定义Web视图中使用此登录会话,并想在Web视图中运行Facebook。我该怎么做


共 (1) 个答案

  1. # 1 楼答案

    我们可以通过以下方式实现:

         webView.loadUrl("https://m.facebook.com/");
    

    其中webView是某个片段中的webView:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    tools:context="com.itsoft.am.worldpeople.web.WebSourceView">
    
    <WebView
        android:id="@+id/web_source_view"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" />
    
     </LinearLayout>
    

    (祝你好运)