I am trying to integrate latest facebook android sdk(v 4.5) Like button. This is what I have put in my facebook_layout.xml
<com.facebook.share.widget.LikeView
android:layout_marginTop="30dp"
android:id="@+id/like_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center">
</com.facebook.share.widget.LikeView>
And I have a fragment where I am putting this like view onCreate method to initialize the view
LikeView likeView = (LikeView)facebookview.findViewById(R.id.like_view);
likeView.setEnabled(true);
likeView.setLikeViewStyle(LikeView.Style.BOX_COUNT);
likeView.setObjectIdAndType(
"https://www.facebook.com/FacebookDevelopers",
LikeView.ObjectType.PAGE);
Apart from this I have also put my app id in AndroidManifest.xml as mentioned here
But I am still not able to get the like to work. When I Click on the like button it just opens up a black facebook activity and for few seconds and closes it, and there are no likes happening on this page or the same page i have created for testing.