Facebook的像Android的按钮实现 [英] Facebook like button implementation in android

查看:112
本文介绍了Facebook的像Android的按钮实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题已经被问了很多次。

I know this question has been asked so many times.

在我的应用我也想整合Facebook的按钮一样,做大量的研究及发展后; D我穿过下面的链接

In my app I also want to integrate Facebook like button,after doing lots of R&D I came across the below link

https://developers.facebook.com/docs/参考/ opengraph /动作类/ og.likes

和我使用的是低于code在我的应用程序,

and I am using the below code in my app,

   Bundle params = new Bundle();
   params.putString("object", "http://samples.ogp.me/226075010839791");

   Request request = new Request(
   Session.getActiveSession(),
   "me/og.likes",
   params,
   HttpMethod.POST
  );
  Response response = request.executeAndWait();
 // handle the response

但是当我点击按钮,像什么也没有发生。

but when I click the like button nothing is happening.

您所有能请指导我如何使用上述code。

Could you all please guide me how to use the above code.

还有一件事需要实现上述code额外的许可?权限:publish_actions。如何获得这个权限

One more thing an extra permission is needed for implementing the above code "Permission: publish_actions".How to get this permission?

推荐答案

首先打开与发布许可使用<会话href=\"http://developers.facebook.com/docs/reference/android/3.0/Session/#openForPublish%28OpenRequest%29\"相对=nofollow>这个

First open session with publish permission using this

这篇关于Facebook的像Android的按钮实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆