Facebook的宁静PHP客户端 - 获取用户的活动 [英] Facebook Restful PHP Client - get Events of a User
问题描述
使用Facebook PHP客户端库,并希望得到用户的活动没有先伐木作为一个用户的IM。
im using the Facebook PHP Client library and want to get the Events of a user without first logging in as a user.
这可能吗?
我得到了用户ID和events.get方法有一个参数UID。
I got the User ID and the events.get method has a parameter UID.
<?php
// Configure
$apiKey = 'xxx';
$secretKey = 'xxx';
// Include Lib
require_once('facebook.php');
// init main object
$facebook = new Facebook($apiKey,$secretKey);
$events = $facebook->api_client->events_get(123456);
?>
所以这块code不起作用。
如果我首先要求有一定的用户登录,我得到我的结果。
心不是有可能得到用户的事件,无需登录?
so this piece of code does not work. if i first require a login of a certain user, i get my results. isnt it possible to get events of a user without logging in?
推荐答案
据Facebook的API文档Events.get
According to the Facebook API Docs for Events.get
http://wiki.developers.facebook.com/index.php/ Events.get
这种方法不再需要一个会话密钥。然而,如果你调用这个方法没有一个活跃的用户会话,你只能得到你的应用是创造者的事件;你只能看到谁授权你的应用程序的活动参与者。如果用户授予应用程序create_event扩展权限的应用程序可为用户创建事件。
基本上,用户必须先登录,否则你只能看到在您的应用程序创建的事件。
Basically, the user has to be logged in otherwise you can only see events in which your app created.
这篇关于Facebook的宁静PHP客户端 - 获取用户的活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!