简体   繁体   English

Facebook GetEvents图API

[英]Facebook GetEvents graph api

I am writing an android app and i need to integrate the add events functionality into that. 我写一个Android应用程序,我需要的添加事件的功能集成到这一点。 i searched the graph api documentation for how to post the data but when i tried that i am getting FileNotFound eception. 我在图api文档中搜索了如何发布数据,但是当我尝试使用FileNotFound接收时。 i am POSTing required data to the URL "https://graph.facebook.com/me/events". 我正在将所需的数据发布到URL“ https://graph.facebook.com/me/events”。 It wouldof great help if anyone could give me small code snippet.. Thanks in advance.. 它wouldof很大的帮助,如果任何人都可以给我一小段代码..在此先感谢..

The code looks like the following: 该代码如下所示:

Bundle params = new Bundle(); Bundle参数= new Bundle();

params.putString("name", "My event"); params.putString(“ name”,“我的事件”);
params.putString("location", "somewhere,test"); params.putString(“ location”,“ somewhere,test”);
params.putString("start_time", "2011-07-29T10:13:00"); params.putString(“ start_time”,“ 2011-07-29T10:13:00”);
params.putString("end_time", "2010-07-29T10:20:00"); params.putString(“ end_time”,“ 2010-07-29T10:20:00”);

facebook.request("me/events", params, "POST"); facebook.request(“我/事件”,参数,“ POST”);

I hope that this code will help you :) 我希望这段代码对您有帮助:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM