如何添加到我的Android应用程序一个按钮比喜欢一个Facebook页面? [英] How to add to my android application a button than do like to a facebook page?
问题描述
我已经尝试过: https://github.com/crowjdh/ android-facebook-like-button-integration
但不行。
当用户按一个按钮到我正在开发的android应用程序时,我搜索比简单的like更简单的我的Facebook页面。
谢谢你
使用这个库: Facebook Like Android for Android 。
详细的手册在这里。
资料来源: https:/
p>
存储库{
mavenCentral()
}
依赖关系{
compile'com.shamanland:facebook-like-button:0.1。 8'
}
最简单的添加方式就是按钮:
< com.shamanland.facebook.likebutton.FacebookLikeButton
style =@ style / Widget.FacebookLikeButton
app:pageUrl =http://blog.shamanland.com/
app:pageTitle =开发人员笔记
app:pageText =这是有关Android开发的博客。
app:pagePicture =@ drawable / ic_launcher
/>
此视图将在您的布局中绘制:
另外还有一些包含喜欢的数字。
I've tried this: https://github.com/crowjdh/android-facebook-like-button-integration
but it not work. I search something more simple than do "like" to my facebook page when user press a button to android application I'm developing. thank you
Use this library: Facebook Like button for Android. There is detailed manual here.
Sources: https://github.com/shamanland/facebook-like-button
Gradle dependency:
repositories {
mavenCentral()
}
dependencies {
compile 'com.shamanland:facebook-like-button:0.1.8'
}
The simplest way to add like button:
<com.shamanland.facebook.likebutton.FacebookLikeButton
style="@style/Widget.FacebookLikeButton"
app:pageUrl="http://blog.shamanland.com/"
app:pageTitle="Developer's notes"
app:pageText="This is blog about Android development."
app:pagePicture="@drawable/ic_launcher"
/>
This view will be drawn in your layout:
In additional there is box with count of likes.
这篇关于如何添加到我的Android应用程序一个按钮比喜欢一个Facebook页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!