就像从应用程序本身的Facebook Android应用程序页面

问题描述:

有没有可能是使用的Andr​​oid应用程序,用户可以像从应用程序本身的Facebook创建应用程序页面?

Is it possible that a user using android application can like that application page created in Facebook from application itself?

是的。

只需创建一个布局具有的WebView

Just create a Layout with a WebView

如同

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">

<WebView 
    android:id="@+id/webview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
/>

</LinearLayout>

创建活动

Like.class

Like.class

WebView webview;
Then add the following at the end of the onCreate() method:
webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl(YOUR_FB_LIKE_URL);