就像从应用程序本身的Facebook Android应用程序页面 [英] like android application page in facebook from application itself

查看:157
本文介绍了就像从应用程序本身的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);

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

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