我正在尝试通过cron-job创建Facebook事件。这些事件应该代表已经授予离线访问权的我的facebook-connect-site用户创建。我有session_keys不过期,但不能让它工作!代表我的应用程序的创建 事件就像一个魅力,只是不是我想要的......通过cron-job创建facebook事件
var_dump($event) with some randomly generated data:
'name' => string 'Try a athirst these and' (length=23)
'tagline' => string 'as it that he down the almost the' (length=33)
'description' => string 'that deeper but is sea whenever lead all a stream knowing robust bakehouses attending have am it pent for own quick' (length=115)
'category' => int 5
'subcategory' => int 52
'location' => string 'same as more the' (length=16)
'start_time' => int 1263630600
'end_time' => int 1263654000
'street' => string 'This Was Ships My 807' (length=21)
'phone' => string '49 692 324' (length=10)
'email' => string '[email protected]' (length=15)
'privacy_type' => string 'OPEN' (length=4)
<?php
$facebook = new Fb(FACEBOOK_API_KEY, FACEBOOK_API_SECRET);
// Set session key (that has been returned after offline-access has been granted)
$facebook->api_client->session_key = '5de03e54cb359f9asf3435365e-4588985454';
$eid = $facebook->api_client->events_create(json_encode($event));
?>
结果:“例外‘FacebookRestClientException’有消息‘无效的参数’”
是谁在那里能够拯救我的一天?
不知道,你应该对SO张贴会话密钥。我可以用它来访问你的活动。 – 2010-01-15 08:59:26
不,你不能。我只是输入了一个看起来像session_key的东西;-) – Sebastian 2010-01-15 11:27:58
你可以发布'$ event'的结构吗?看起来你在那里有不好的数据。 – mattbasta 2010-01-15 14:18:02