我需要一些帮助来从event_new PHP API方法中检索事件id。我可以看到URL方法通过返回包含新ID的XML文件很好地工作,但是我从PHP API方法得到的响应只是'NULL'。
文档说XML和URL方法都返回了新的事件ID,任何人都可以提供我需要做的帮助吗?
干杯 保罗
答案 0 :(得分:0)
我无法重现您的错误。你有任何样本代码要分享吗?
你在运行什么PHP版本?
这个测试适用于我:
//PHP API Client Lib is available here: https://github.com/ryanjarvinen/eventbrite.php
include "Eventbrite.php";
//Authorization tokens are outlined here:
// http://developer.eventbrite.com/doc/authorization/
$eb = new Eventbrite(array('app_key'=>'YOUR_APPLICATION_KEY','user_key'=>'YOUR_USER_KEY'));
try{
//Docs on how to use the API's event_new method are located here:
// http://developer.eventbrite.com/doc/events/event_new/
$response = $eb->event_new(array('title'=>'test event_new','start_date'=>'2012-12-12 12:00:00','end_date'=>'2012-12-12 12:12:12'));
print "The new event_id is: {$response->process->id}";
}catch( Exception $e){
var_dump($e);
}
有a few more PHP-specific usage notes available on github。
有关authentication tokens的大部分一般信息,以及有关输入和输出参数per API method的详细信息,应在http://developer.eventbrite.com/上提供