- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正尝试在由其 ID 定义的用户墙上发布消息,但作为响应,我收到错误“未知方法”。
我的代码是:
final Bundle params = new Bundle();
params.putByteArray("message", "Test".getBytes());
params.putByteArray("name", "American Virgin".getBytes());
params.putByteArray("link", "http://bit.ly/12345".getBytes());
params.putByteArray("description", "A Freshman College Girl on a scholarship from an ...".getBytes());
params.putByteArray("picture", "http://xxx/MOV1026.jpg".getBytes());
final Request postToWall = Request.newRestRequest(Session.getActiveSession(),
"/" + pickedUsersId.get(0) + "/feed", params, HttpMethod.POST);
postToWall.setCallback( new Request.Callback()
{
@Override
public void onCompleted(Response response)
{
Log.i(Utils.LOG, response.toString());
}
});
Request.executeBatchAsync(postToWall);
在 LogCat 中我有:
11-08 17:34:29.136: I/LOG(21699): {Response: responseCode: 200, graphObject: null, error: {FacebookServiceErrorException: httpResponseCode: 200, facebookErrorCode: 3, facebookErrorType: null, message: Unknown method}, isFromCache:false}
最佳答案
除了 Request
方法中的 graphPath
参数外,一切看起来都正确。而不是:
"/"+ pickedUsersId.get(0) + "/feed"
做:
pickedUsersId.get(0) + "/feed"
图形路径前不应有前导斜杠“/”。您可以随时引用我们的文档,了解如何准确发布到 Feed。 https://developers.facebook.com/docs/howtos/androidsdk/3.0/publish-to-feed/
关于android - 使用 sdk 3.0 在 facebook 墙上发帖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13290047/
这个问题在这里已经有了答案: Syntax error due to using a reserved word as a table or column name in MySQL (1 个回答)
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 8 年前。 Improve th
这就是我所做的 在 Facebook 上创建了一个应用 安装了满足所有要求的 FB SDK 通过登录按钮登录用户 现在我正在尝试使用此处提供的来自此威胁的代码进行发布 How to Post to F
我正在尝试用 YouTube 视频发帖。每个帖子都有一个 YouTube 视频链接,就像这样: { title: "Some video", link: "http://www.youtu
我可以使用 HttpClinet 类获取网页,如下所示: HttpClient client = new HttpClient(); HttpResponseMessage response = aw
我正在尝试使用 Alamofire 将某些内容发布到我的服务器,但我无法让它工作。在 Postman 中,它看起来像这样: 这是我的代码: func uploadDish(dish:Dish, com
我正在尝试使用 Facebook SDK 从我的应用程序中将帖子集成到用户墙上。简单发布没问题,但我正在尝试添加用户实际所在的位置(在时间之后的帖子底部)。 有什么想法吗?感谢您的帮助! 最佳答案 这
是否可以使用当前的 G+ API 发布到用户墙上?我只能找到有关获取信息的信息。似乎目前不支持发布任何数据。 最佳答案 信息来自 https://developers.google.com/+/api
我正在遵循使用 Open Graph Beta 的官方指南,并且能够使用我的用户名发布操作(我是该应用程序的开发者)。但是,当我尝试使用其中一个测试用户时,我收到以下错误消息: { "error
有人可以就如何使用 Jekyll 处理我的投资组合页面的结构提供一些指导或建议吗?我的帖子通过混合变量和帖子内容来处理大部分工作。我在呈现帖子页面时遇到问题,因为 HTML 和 markdown 标记
我正在尝试将以下 curl 命令行自动化到 Ruby Curb 中: curl -H "Content-Type:application/json" -X POST -d \ '{"approval
我的部分 View : @model Alina_2017.Models.DropDownModel Groepen @using (Html.BeginForm("Sel
我的部分 View : @model Alina_2017.Models.DropDownModel Groepen @using (Html.BeginForm("Sel
我想发布一个使用 jQuery ajax 的文章,无需重新加载页面,它在 Chrome 中工作正常,但在 Firefox 6.0 中不起作用。下面是我的代码 fun
实际上客户端驻留在 tomcat 8080 中,而 REST API 驻留在 9090 中。当移动到更高的环境时,URL 会有所不同。我没有看到使用 httpasyncclient 对 REST AP
我想通过 Javascript 通过扩展发布到 Google+ 用户流。我知道 Google+ 还没有 API,但我已经看到这是用 PHP api 完成的。有没有人知道从哪里开始实现这个?我不需要任何
在他/她使用 wordpress api 给我他的登录信息后,我如何远程发帖到用户的博客?我需要使用什么方法,它应该有什么参数等等?示例代码会很棒。 我更愿意使用 XML-RPC api,但其他的也可
我正在尝试使用 Perl 的 Net::Blogger 自动发布到博客,但它一直返回 false 并且不发布。我的代码的主要部分如下所示: use Net::Blogger; my $blogger
我一直在寻找从 wp7 应用程序发布到 twitter 的解决方案,但发现关于此事的资源非常有限。一切似乎都使用不同的编程语言(例如 PHP)或平台(ASP.NET),或者缺少文档。 这些问题不适用于
我正在尝试创建一个网络服务来使用 Google Plus API。我正在用 Java 编写它,但是我无法弄清楚我需要哪些文件以及如何使用 Java 发布到 Google+ 群组 如果您有任何站内信息,
我是一名优秀的程序员,十分优秀!