【发布时间】:2017-01-15 16:10:14
【问题描述】:
我正在开发一个在 Facebook 上发布照片的 Android 应用,同时我想从我的 Android 应用中计算该照片的点赞数。
有关信息 - 我正在使用 Facebook SDK,并且我已成功登录 Facebook 帐户并发布了图片。
下图的方法
private void PublishImage()
{
Bitmap image = BitmapFactory.decodeResource(getResources(),R.mipmap.ic_launcher);
//Here we set all the required parameters to share the image and build that
SharePhoto photo = new SharePhoto.Builder()
.setBitmap(image)
.setCaption("Testing Sharing Feature through java")
.build();
//Now we share the PhotoContent by adding the properties in instance of SharePhotoContent
share = new SharePhotoContent.Builder()
.addPhoto(photo)
.build();
//Now we use share API to share the image
ShareApi.share(share,null);
}
如何使用java而不是手动使用Graph API Explorer来计算张贴照片的点赞数?
【问题讨论】:
标签: java android facebook-android-sdk facebook-java-api