I have added LikeView to my Android application as following:
LikeView likeView = (LikeView) lytMain.findViewById(R.id.like_view);
likeView.setLikeViewStyle(LikeView.Style.BOX_COUNT);
likeView.setAuxiliaryViewPosition(LikeView.AuxiliaryViewPosition.INLINE);
likeView.setOnErrorListener(new LikeView.OnErrorListener() {
@Override
public void onError(FacebookException error) {
Log.i("test", "Facebook error " + error.toString());
}
});
likeView.setObjectIdAndType(
"https://www.facebook.com/mypage/",
LikeView.ObjectType.PAGE);
Added application to facebook and when I press LikeButton every thing works and shows the current like count.
But when count increases in page like count does not refreshes automatically in my app.
To get new count i have to press LikeButton again, after that it shows refreshed count from my page.
My question is:
How can set auto refresh to my LikeView so that it shows fresh like count from my Facebook page every time when I open application?