创建使用Facebook的旧的API在Android中的事件 [英] Create events in Android using Facebook old api

查看:101
本文介绍了创建使用Facebook的旧的API在Android中的事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的code

        JSONObject event = new JSONObject();
        Bundle bundle = new Bundle();
        bundle.putString("method","events.create");
        event.put("name", "name");
        event.put("location", "Address");
        event.put("start_time", "2011-12-15T10:13:00");
        event.put("end_time", "2011-12-15T10:20:00");
        event.put("privacy_type", "OPEN");
        event.put("event_info", "INFO");
        Log.d(TAG,"evento "+mFacebook.request(bundle));

和这个错误...

             {"error_code":100,"error_msg":"The parameter event_info is                                                       required","request_args":   [{"key":"access_token","value":"asdasdasd"},{"key":"method","value":"events.create"},{"key":"format","value":"json"}]}

我使用的是旧的API ......如果你知道创建一个使用新的API,我会很感激在Android中的事件

i'm using the old api...if you know create events in Android using the new Api I will be grateful

在此先感谢

推荐答案

您可以创建事件使用图形API :发送POST请求。我尝试用参数​​:名称,START_TIME,END_TIME,描述,privacy_type。
如果我正确理解requered PARAMS唯一的名字和START_TIME。如果您没有设置end_time时间,这将是平等的START_TIME + 3H。默认情况下的隐私是开放的。
但我不明白,你event_info想要什么?
您可以添加到冈田位置。或者你想发送扩展与Facebook的对象的信息,一些地方(如图形API场地)?

You can create event using Graph API: send POST request. I try with parameters: name, start_time, end_time, description, privacy_type. If I right understood requered params only name and start_time. If you not set end_time, it will be equal start_time + 3h. By default privacy is OPEN. But I not understood, what you want from event_info? You can add to POST field location. Or you want send extend information with facebook object as some place (as in Graph API venue)?

这篇关于创建使用Facebook的旧的API在Android中的事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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