Facebook的Andr​​oid SDK中的请求参数:在哪里找到文档? [英] Facebook Android SDK request parameters: where find documentation?

查看:125
本文介绍了Facebook的Andr​​oid SDK中的请求参数:在哪里找到文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

晚上好。 我正在开发一个使用Facebook的SDK Android应用程序。 我已经与用户的OAuth认证没有问题,我使用SDK来添加用户墙上一个简单的状态更新已经没有问题了。

Good evening. I'm developing an android application that uses Facebook SDK. I've no problem with user oauth authentication and I've no problem using the SDK to add a simple status update on the user wall.

现在我试图用更深入这个Facebook的Andr​​oid SDK和我发现了一个非常大的缺乏有关文档。

Now I'm trying to use more deeply this Facebook Android SDK and I found a really big lack about documentation.

目前我使用这个片段的code添加的用户状态:

At the moment I'm using this snippet of code to add the user status:

        Bundle params = new Bundle();
    params.putString("message", "my message");
    params.putString("link", "my site url" );
    params.putString("name", "my name");
    params.putString("caption", "my caption" );

    mAsyncRunner.request(REQUEST_WALL_POST, params, HTTP_METHOD_POST, listener, null);

它的工作原理pretty的好。

it works pretty well.

现在我想添加更多的内容和属性,这个Facebook的状态。例如(在我的情况),我想用户的位置(与Android GPS获取)添加到Facebook的更新。 我试图寻找到Facebook的API文档,但唯一的半有用的事情,我发现是这样的:的 https://developers.facebook.com/docs/reference/api/post/

Now I want to add more content and attributes to this facebook status. For example (in my scenario) I want to add the user location (taken with Android GPS) to the facebook update. I tried to search into Facebook API Documentation but the only "semi-usefull" thing I found is this: https://developers.facebook.com/docs/reference/api/post/

有关我的理解这说明这是一个邮政领域的回报,而不是领域,我可以用它来创建一个附加职位的要求。

For what I understand this explain which are a Post's return fields and not fields I can use to create a add-post request.

无论如何,我找到了地方字段:

Anyway I found the "place" field:

地点

与邮政相关的位置,如果有的话

Location associated with a Post, if any

对象包含 ID 名称页与此位置相关,   和位置字段包含地理信息,如   纬度 经度 国家等领域(领域将根据不同而不同   地理和信息的可用性)

object containing id and name of Page associated with this location, and a location field containing geographic information such as latitude, longitude, country, and other fields (fields will vary based on geography and availability of information)

我找不到任何工作示例(或简单的一个例子!)了解如何构建这个领域,如果我有能力,也不通到Android包。

I cannot find any kind of working example (or simple an example!!) to understand how to build this field and if I can or not pass to the Android bundle..

有人能解释我?

更新

我刚刚作出了一个份额,SoundHound(音乐应用程序),以及我需要的是perfeclty做类似的东西:<一href="https://www.facebook.com/emanuele.ricci/timeline/story?ut=64&wstart=1325404800&wend=1328083199&hash=-4777352490458351023" rel="nofollow">https://www.facebook.com/emanuele.ricci/timeline/story?ut=64&wstart=1325404800&wend=1328083199&hash=-4777352490458351023

I just made a share with SoundHound (a music application) and what I need is to perfeclty do something like it: https://www.facebook.com/emanuele.ricci/timeline/story?ut=64&wstart=1325404800&wend=1328083199&hash=-4777352490458351023

没错就好了!

UPDATE2

这是结果:<一href="https://www.facebook.com/emanuele.ricci/timeline/story?ut=64&wstart=1325404800&wend=1328083199&hash=-1081865809871332449" rel="nofollow">https://www.facebook.com/emanuele.ricci/timeline/story?ut=64&wstart=1325404800&wend=1328083199&hash=-1081865809871332449

完美!

推荐答案

也许我发现一些有趣的事情。

Maybe I found something interesting.

这是facebook的文档页面: HTTPS://developers.facebook。 COM /文档/参考/对话框/饲料/#graphapicall

This is the facebook documentation page: https://developers.facebook.com/docs/reference/dialogs/feed/#graphapicall

我需要用的是这样的:

属性

键/值对的JSON对象将出现在   流附件描述的下方,对每个属性的   自己的行。关键字必须是字符串,值可以是字符串或   JSON对象的键文字和HREF。

A JSON object of key/value pairs which will appear in the stream attachment beneath the description, with each property on its own line. Keys must be strings, and values can be either strings or JSON objects with the keys text and href.

我会尝试一下,我会后一定的成效:)

I will experiment a bit and I'll post some results :)

这篇关于Facebook的Andr​​oid SDK中的请求参数:在哪里找到文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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