【问题标题】:android facebook sdk 3.0 custom like buttonandroid facebook sdk 3.0 自定义点赞按钮
【发布时间】:2013-01-04 16:11:01
【问题描述】:

我正在使用适用于 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 调用。

不能在应用中使用吗?

【问题讨论】:

标签: android facebook-android-sdk


【解决方案1】:

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);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多