1

Facebookに写真を投稿するandoridアプリを開発していますが、同時に、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);

}

Graph API Explorer を手動で使用する代わりに、java で投稿された写真のいいねの数を計算するにはどうすればよいですか?

4

1 に答える 1

0

グラフ API がなければ、それはできないと思います。ShareApi.share() を呼び出すと、実際には写真をアップロードするグラフ API 要求があり、さまざまなプラットフォームからいいねを取得します。アプリは投稿されたいいねの数を知る方法がありません。

于 2016-09-07T21:20:02.813 に答える