如何让Facebook喜欢在Android中使用Facebook sdk4.0?

时间:2015-03-28 20:14:14

标签: android facebook-graph-api android-studio facebook-sdk-4.0

  Session session = Session.getActiveSession();
        Request.Callback callback = new Request.Callback() {

            @Override
            public void onCompleted(Response response) {
                // response should have the likes
                Toast.makeText(getApplicationContext(), response.toString(), Toast.LENGTH_LONG).show();
            }
        };
        Request request = new Request(session, "me/likes", null, HttpMethod.GET, callback);
        RequestAsyncTask task = new RequestAsyncTask(request);
        task.execute();``

我试图让facebook喜欢使用这个代码使用facebook sdk但是它没有用。有没有其他方法可以获得它?

1 个答案:

答案 0 :(得分:0)

您可以在此尝试此代码link

它会帮助你