1

我正在使用适用于 Android 的 Facebook SDK 3.0。

如何制作自定义喜欢按钮

Request request = new Request(session, page_id + "/likes", null, HttpMethod.POST,  new Callback()
{
    @Override
    public void onCompleted(Response response)
    {
        Log.i(DEBUG_TAG, response.toString());
        // TODO Auto-generated method stub
        if (response.getGraphObject() != null)
        {
            //Log.i(DEBUG_TAG, response.toString());
        }
    }
});
RequestAsyncTask task = new RequestAsyncTask(request);
task.execute();

page_id = 417732304946490

有 OAuthException (#3) 应用程序没有能力进行这个 API 调用。

没有办法在应用程序中使用?

4

1 回答 1

3

Facebook 图形 API 不提供给 Facebook 页面点赞的功能。相反,您可以使用您的页面 URL 打开 web 视图,以便您可以登录并喜欢您的页面。

 // To open webview
 String url = "your page URL";
 Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
 startActivity(i);
于 2013-01-25T09:47:59.500 回答